Non-ascii characters in recipient names

Jan Eden tech at eden.one
Mon Jun 24 14:32:23 UTC 2024


On 2024-06-21 10:34, Michael Kjörling wrote:

> On 21 Jun 2024 09:52 +0200, from mutt-users at mutt.org (Jan Eden via Mutt-users):
> >> I noticed that non-ascii characters in recipient names become garbled
> >> recently (in Mutt 2.2.13, installed via Homebrew):
> >> 
> >> "Basi´c, P." <address at recipient.name>
> >> 
> >> becomes
> >> 
> >> "Basi´c, P." <address at recipient.name>
> 
> I don't see any difference between those two. Using the values from
> your original post:
> 
> $ printf '"Basi´c, P."' | xxd
> 00000000: 2242 6173 69c2 b463 2c20 502e 22         "Basi..c, P."
> $ printf '"Basi´c, P."' | xxd
> 00000000: 2242 6173 69c2 b463 2c20 502e 22         "Basi..c, P."
> $
> 
> in addition to looking the same when rendered, they appear to be
> identical. Yes, I copied the respective versions from your email.
> 
> Do they appear different to you? If so, in what way?

Sorry, I should have expected that. The attached screenshot shows the
difference. [Edit: Screenshot removed due to its size; problem is
solved, s. below]

> > So for some reason, mutt seems to have switched from using utf-8 to
> > iso-8859-1 for encoding, and I cannot figure out why it did. This
> > affects not only headers, but the mail body, too.
> 
> Check the values for $send_charset and $charset. Per the manual
> <http://mutt.org/doc/manual/#send-charset> the default for
> $send_charset is to use ISO-8859-1 in preference of UTF-8 if possible,
> but to fall back to UTF-8 if neither US-ASCII nor ISO-8859-1 can
> encode the contents of the email.

$charset was set to utf-8 already, while $send_charset contained
"us-ascii:iso-8859-1:utf-8".

> You may also want to check $allow_8bit. In today's environment, it
> should probably be turned on unless you have a specific reason to turn
> it off.
> 
> In my case, I have explicitly set $send_charset="us-ascii:utf-8" for
> best adherence to RFC 5198. (Technically, since everything US-ASCII is
> also valid UTF-8, I could in principle remove the US-ASCII part; but
> with it, if an email can be represented in US-ASCII, the recipient
> does not need to understand UTF-8 at all.)

I followed the advice regarding $send_charset, and the change solved my
problem! While this is great, I wonder why this changed some days ago,
because mutt did use utf-8 automatically when sending messages for
several years now (until 2024-06-13, to be exact).

Thank you!

- Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.mutt.org/pipermail/mutt-users/attachments/20240624/a7ba589a/attachment-0001.asc>


More information about the Mutt-users mailing list