GNU bug report logs -
#56824
29.0.50; mail-header-parse-address drops the 1st character from the name
Previous Next
Reported by: sds <at> gnu.org
Date: Fri, 29 Jul 2022 13:32:02 UTC
Severity: normal
Found in version 29.0.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Sam Steingold <sds <at> 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 <at> gmail.com>")
>> -> ("stepnem <at> 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 <at> example.com>" decoded to, "@ndré
<andre <at> example.com>" which is valid and appears in the wild).
This bug report was last modified 3 years and 27 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.