1
Vote

Parsing of charset fails for GMail

description

ImapMessageBodyPart Line 277:

replace

Match match = Regex.Match(data, "\"charset\"\s\"(?<set>([^\"]*))\"", RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase);

with

Match match = Regex.Match(data, "\"charset\"\s\"(?<set>([^\"]*))\"", RegexOptions.ExplicitCapture);

fixes the problem!

comments

DieBagger wrote Oct 29, 2009 at 4:21 PM

Same goes for parsing the filename of attachments -> ImapMessageBodyPart Line 309:

replace

Match match = Regex.Match(data, "\"name\"\s\"(?([^\"]*))\"", RegexOptions.ExplicitCapture);

with

Match match = Regex.Match(data, "\"name\"\s\"(?([^\"]*))\"", RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase);