[PATCH v1 1/2] emacs: Observe the charset of MIME parts when reading them.

David Edmondson dme at dme.org
Tue May 3 03:28:15 PDT 2016


On Mon, May 02 2016, Mark Walters wrote:
> On Sat, 30 Apr 2016, David Edmondson <dme at dme.org> wrote:
>> `notmuch--get-bodypart-raw' previously assumed that all non-binary MIME
>> parts could be successfully read by assuming that they were UTF-8
>> encoded. This was demonstrated to be wrong, specifically when a part was
>> marked as ISO8859-1 and included accented characters (which were
>> incorrectly rendered as a result).
>>
>> Rather than assuming UTF-8, attempt to use the part's declared charset
>> when reading it, falling back to US-ASCII if the declared charset is
>> unknown, unsupported or invalid.
>
> As this seemed hard to test (if I understand the bug correctly it didn't
> show up on my test of the entire of the entire performance corpus -- of
> course my testing could have been wrong) would it be possible to add a test
> for it?

I agree that we should have a test, and I will make one.

(/me lives in fear of the day when bremner introduces a "no fixes
without tests" policy...)


More information about the notmuch mailing list