all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Štěpán Němec" <stepnem@gmail.com>
To: 36852@debbugs.gnu.org
Subject: bug#36852: 27.0.50; ietf-drums-parse-address doesn't handle non-ascii properly
Date: Tue, 30 Jul 2019 11:16:53 +0200	[thread overview]
Message-ID: <871ry7g9ve.fsf@gmail.com> (raw)


ietf-drums-parse-address (AKA mail-header-parse-address) uses
ietf-drums-atext-token to parse display-name, but the regexp range only
contains ASCII characters, so e.g. as used in debbugs-gnu-show-reports,
the following happens:

  (mail-header-parse-address
   (decode-coding-string "Áaááá Ůůůůů <aaa@example.net>" 'utf-8))

  ;;=> ("aaa@example.net" . "aááá")

It actually only cares about the first char of a word:

  (let ((ietf-drums-atext-token "-ÁŮ^a-zA-Z0-9!#$%&'*+/=?_`{|}~"))
    (mail-header-parse-address
     (decode-coding-string "Áaááá Ůůůůů <aaa@example.net>" 'utf-8)))

  ;;=> ("aaa@example.net" . "Áaááá Ůůůůů")

I'm not quite sure what the proper fix is, as the ASCII-only thing seems
to be intentional. Maybe it's just not supposed to be used the way it is
used in debbugs-gnu.el?





             reply	other threads:[~2019-07-30  9:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30  9:16 Štěpán Němec [this message]
2019-07-30  9:53 ` bug#36852: 27.0.50; ietf-drums-parse-address doesn't handle non-ascii properly Robert Pluim
2019-09-15 12:00 ` 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=871ry7g9ve.fsf@gmail.com \
    --to=stepnem@gmail.com \
    --cc=36852@debbugs.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.