From: Lars Ingebrigtsen <larsi@gnus.org>
To: Sam Steingold <sds@gnu.org>
Cc: 56824@debbugs.gnu.org
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 [thread overview]
Message-ID: <8735ei257j.fsf@gnus.org> (raw)
In-Reply-To: <lzsfmkyq9p.fsf@3c22fb11fdab.ant.amazon.com> (Sam Steingold's message of "Fri, 29 Jul 2022 09:58:26 -0400")
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).
next prev parent reply other threads:[~2022-07-30 11:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-29 13:31 bug#56824: 29.0.50; mail-header-parse-address drops the 1st character from the name Sam Steingold
2022-07-29 13:36 ` Lars Ingebrigtsen
2022-07-29 13:58 ` Sam Steingold
2022-07-30 11:46 ` Lars Ingebrigtsen [this message]
2022-07-30 11:47 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8735ei257j.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=56824@debbugs.gnu.org \
--cc=sds@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.