Re: Re: Non-ascii characters in recipient names

Jan Eden via Mutt-users <[email protected]>
Newsgroups gmane.mail.mutt.user
Message-ID <[email protected]>
On 2024-06-21 10:34, Michael Kjörling wrote:

> On 21 Jun 2024 09:52 +0200, from [email protected] (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." <[email protected]>
> >> 
> >> becomes
> >> 
> >> "Basi´c, P." <[email protected]>
> 
> 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
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQQg9//YDsLBcpRDSgIg03s851X+OgUCZnmDdgAKCRAg03s851X+
OuPOAQC0aFCArRRnW9tU4SMD5nzDL8yXHb4fvoVZPbwwFAcx6QEA/rplxCkRb+2x
ltSrGNwDn8n0bWCHYVnuRMRTk1FMsgE=
=RZpn
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.