Decoding quoted-printable strings

Feb 14, 2013 at 6:16 AM
The Cyrillic subject is received encoded with the quoted-printable encoding.
It would be great if the netDumbster provided a method to decode such strings (e.g. it can provide a Subject property in the SmtpMessage class that will contain decoded version of the Headers["Subject"]).

I used the following function to decode quoted-printable strings (which is slightly modified function from http://stackoverflow.com/questions/2226554/c-class-for-decoding-quoted-printable-encoding)
    public static string DecodeQuotedPrintable(string value)
    {
        var concatenated = value.Replace("?= =?utf-8?Q?", "");

        var attachment = Attachment.CreateAttachmentFromString("", concatenated);
        return attachment.Name;
    }