Josef 'Jupp' Schugt <jupp / gmx.de> wrote: > If you want to convert this to ordinary Latin-1 text: > If header matches '=?ISO-8859-1?Q?' (read in text up to terminating > '=') then repace =AF by \0xAF. Quick and dirty but works. [some hours later] my quick&dirty hack: def decode(str) str = str.gsub(/=\?iso-8859-(1|15)\?q\?(.*?)\?=/i){|x| x.gsub(/=\?iso-8859-(1|15)\?q\?/i,"") [0..-3].unpack("M*").to_s.tr("_"," ")} str = str.gsub(/=\?iso-8859-(1|15)\?b\?(.*?)\?=/i){|x| x.gsub(/=\?iso-8859-(1|15)\?b\?/i,"") [0..-3].unpack("m*").to_s.tr("_"," ")} str end not a perfect conversion, but at least -1 and -15, Q and B cases are readable and that's good enough for me the Ruby experts may suggest now a way to roll both into one ;-) uhhhh... nearly 4am, better go to bed now, Martin