From: Adriano Ferreira Date: 2005-04-19T03:16:53+09:00 Subject: Re: How do I decode strings? On 4/18/05, Dr Balwinder S Dheeman wrote: > Ho do I decode MIME encoded strings like > "=?ISO-8859-15?Q?Jes=FAs_=C1ngel?=", to 8 and, or 7 bit ASCII? The "Q" means it uses the encoding known as "quoted-printable". This and Base64 are the usual encodings in MIME. QuotedPrintable is simpler and results in longish encoded strings, being suitable for texts with a few characters out of ASCII 7-bit range. From "[SUMMARY] Quoted Printable (#23)" (http://ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-talk/133976) sent to this mailing list, class String def to_quoted_printable(*args) [self].pack("M").gsub(/\n/, "\r\n") end def from_quoted_printable self.gsub(/\r\n/, "\n").unpack("M").first end end provides the solution you want. Just try: s = "Jes=FAs_=C1ngel"; print s.from_quoted_printable Cheers, Adriano.