Quoth David Edmondson on Jan 12 at 1:31 pm: > Add the charset of text/html parts to the JSON output of 'notmuch > -show' when it is known. Observe the encoding when rendering such > parts in emacs.
This seems like a fine interim solution to me, though I'd like to see a comment above the change in format_part_content_json explaining why we include the content charset for text/html and not for anything else. Perhaps something like, /* For non-HTML text/* parts, we include the content in the JSON. * Since JSON must be Unicode, we handle charset decoding here and do * not report a charset to the caller. For text/html parts, we do not * include the content. If a caller is interested in text/html parts, * it should retrieve them separately. Since this makes charset * decoding the responsibility on the caller, we report the charset * for text/html parts. */