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

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

bug#19431: 24.4; Bad handling of RFC2047 encoded headers by 'mail-extrac


From: Enrico Scholz
Subject: bug#19431: 24.4; Bad handling of RFC2047 encoded headers by 'mail-extract-address-components'
Date: Mon, 22 Dec 2014 16:10:56 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

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@example.com>")
       (decoded (rfc2047-decode-string address)))
  ; show output with encoded umlauts and non-RFC2047 header
  (print (mail-extract-address-components "\"Baer, Klaus\" <test@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@example.com")            <--- this is expected
| 
| "=?utf-8?Q?B=61=65r=2C_Klaus?= <test@example.com>"
| 
| "Baer, Klaus <test@example.com>"
| 
| ("utf" "test@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





reply via email to

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