bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#56824: 29.0.50; mail-header-parse-address drops the 1st character fr


From: Lars Ingebrigtsen
Subject: bug#56824: 29.0.50; mail-header-parse-address drops the 1st character from the name
Date: Sat, 30 Jul 2022 13:46:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Sam Steingold <sds@gnu.org> writes:

> Should I call `mail-header-parse-addresses' _first_ and then
> `mail-decode-encoded-word-string'?

Yup.  Or use the RAWP parameter to `mail-header-parse-addresses' and
then parse with `mail-header-parse-address' with a DECODE parameter.

>> You're probably looking for `mail-header-parse-address-lax':
>>
>> (mail-header-parse-address-lax "Štěpán Němec <stepnem@gmail.com>")
>> -> ("stepnem@gmail.com" . "Štěpán Němec")
>
> ... Or maybe I should keep the current order of processing and use
> `mail-header-parse-address-lax'?

No, that'll always be less reliable, because the -lax version uses
heuristics.  This makes a difference when the address is something weird
like the name part containing an @ character (like
"=?utf-8?Q?=40ndr=C3=A9?= <andre@example.com>" decoded to, "@ndré
<andre@example.com>" which is valid and appears in the wild).






reply via email to

[Prev in Thread] Current Thread [Next in Thread]