Replying does not decode UTF-8 addresses
When I reply to a mail that gets shown as From: Firstname Sjökvist in the UI, the draft and reply show To: =?utf-8?q?Firstname_Sj=C3=B6kvist?= <[email protected]>.
I haven't tried how that actually arrives when sending (i.e. whether that gets escaped again to a literal =?utf8?...), but IMHO:
- The draft and editor should show this as
To: Firstname Sjökvist - Only when sending, that should be encoded accordingly
This seems to be a regression caused by 75317070346c3c268de4b5163a1ea0c95ef82a81, and more specific usage of the function email.utils.formataddr, which 'header-encodes' the name:
>>> email.utils.formataddr(('Céline', '[email protected]'))
'=?utf-8?q?C=C3=A9line?= <[email protected]>'
Source: emails.util.formataddr
One solution could be not to touch the address headers (they are already properly formatted by notmuch) and use notmuch-reply to construct the reply template. It also adds "In-Reply-To" and "References" headers. In other words let notmuch do the heavy lifting.