GNU bug report logs - #19431
24.4; Bad handling of RFC2047 encoded headers by 'mail-extract-address-components'

Previous Next

Package: emacs;

Reported by: Enrico Scholz <enrico.scholz <at> sigma-chemnitz.de>

Date: Mon, 22 Dec 2014 17:58:01 UTC

Severity: normal

Tags: fixed

Found in version 24.4

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Enrico Scholz <enrico.scholz <at> sigma-chemnitz.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4; Bad handling of RFC2047 encoded headers by
 'mail-extract-address-components'
Date: Mon, 22 Dec 2014 16:10:56 +0100
Hi,

the emacs email framework fails on email addresses containing umlauts.
E.g. in the following example

--- {{{ snip ---
; set a (nearly) real-world To: address; the umlaut '=C3=A4' encoding
; was replaced by '=61=65'
(let* ((address "=?utf-8?Q?B=61=65Br=2C_Klaus?= <test <at> example.com>")
       (decoded (rfc2047-decode-string address)))
  ; show output with encoded umlauts and non-RFC2047 header
  (print (mail-extract-address-components "\"Baer, Klaus\" <test <at> example.com>"))
  (print address t)
  (print decoded t)
  ; previous prints were just for debugging purposes; now, the real
  ; functions will be called...
  (print (mail-extract-address-components address))
  (print (mail-extract-address-components decoded)))
--- }}} snip ---

none of the last two debug outputs show the expected split.

| ("Klaus Baer" "test <at> example.com")            <--- this is expected
| 
| "=?utf-8?Q?B=61=65r=2C_Klaus?= <test <at> example.com>"
| 
| "Baer, Klaus <test <at> example.com>"
| 
| ("utf" "test <at> example.com")   <-- BAD (working on undecoded string)
| 
| (nil "Baer")                 <-- BAD (working on decoded string)
| (nil "Baer")


Unfortunately, such RFC2047 encoded addresses are very common in Germany
so that e.g. BBDB (which works on the 'decoded' string) fails in very
much cases.



Enrico




This bug report was last modified 7 years and 97 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.