.NET Framework Bookmark and Share   
 index > .NET Framework Networking and Communication > Decoding quoted-printable
 

Decoding quoted-printable

Well, yeah i'm not able to decode quoted-printable decoded messages, so i need help. I need to decode quoted-printable email messages. I'm using this code:
That works for 'subject' and 'from' headers, but doesn't work for bodies.
Regex hexRegex = new Regex(@"(\=([0-9A-F][0-9A-F]))", RegexOptions.IgnoreCase); 
                        value = hexRegex.Replace(value, new MatchEvaluator(HexMatchEvaluator));
                        value = value.Replace('_', ' '); 

         static string HexMatchEvaluator(Match m)
        {
            int dec = Convert.ToInt32(m.Groups[2].Value, 16);
            char character = Convert.ToChar(dec);
            return character.ToString();
        }
I've searched for this on the net and the examples i've found didn't work either. Can someone help me?

vendir
Is the body perhaps Base64 encoded?

Show us some sample lines both from the body, also show the headers.
http://www.alanjmcf.me.uk/ Please follow-up in the newsgroup. If I help, mark the question answered
Alan J. McFarlane

You can use google to search for other answers

Custom Search

More Threads

• how to determine if the connection was closed remotely
• Getting a file list from an HTTP server
• WSE 3.0 Change KeyIdentifier?
• reqFTP.EnableSsl = true;
• Interprocess communication for Unmanaged <-> Managed code?
• Silverlight Client not connecting to WPF Server
• UDP conference exception .. help pls
• Webbrowser help.
• comm.
• WebClient Throwing Remote Server Error 500