Handling mislabeled emails encoded with Windows-1252

Sebastian Poeplau sebastian.poeplau at eurecom.fr
Mon Jul 30 00:47:55 PDT 2018


Hi,

>> As an added optimization, you could try limiting that block of code to
>> just when the charset is one of the iso-8859-* charsets.
>>
>> The following code snippet should help with that:
>>
>> charset = charset ? g_mime_charset_canon_name (charset) : NULL;
>> if (wrapper && charset && g_ascii_strncasecmp (charset, "iso-8859-", 9)) {
>>     ...
>>
>> The reason you need to use g_mime_charset_canon_name (if you decide to
>> add the optimization) is that mail software does not always use the
>> canonical form of the various charset names that they use. Often you
>> will get stuff like "latin1" or "iso_8859-1".
>
> Nice, I'll add it.

Updated patch attached.

Cheers,
Sebastian


-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_windows_charsets.patch
Type: text/x-patch
Size: 2426 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20180730/dd92f02c/attachment.bin>


More information about the notmuch mailing list