From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#19431: 24.4; Bad handling of RFC2047 encoded headers by 'mail-extract-address-components' Date: Sun, 15 Apr 2018 19:51:13 +0200 Message-ID: <87zi248ijy.fsf@mouse.gnus.org> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1523814614 3968 195.159.176.226 (15 Apr 2018 17:50:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 15 Apr 2018 17:50:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 19431@debbugs.gnu.org To: Enrico Scholz Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 15 19:50:10 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f7ln0-0000w3-2R for geb-bug-gnu-emacs@m.gmane.org; Sun, 15 Apr 2018 19:50:10 +0200 Original-Received: from localhost ([::1]:59349 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f7lp5-0007CO-AX for geb-bug-gnu-emacs@m.gmane.org; Sun, 15 Apr 2018 13:52:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f7lot-0007BO-Sx for bug-gnu-emacs@gnu.org; Sun, 15 Apr 2018 13:52:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f7lop-0003l1-19 for bug-gnu-emacs@gnu.org; Sun, 15 Apr 2018 13:52:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46526) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f7loo-0003kq-Sh for bug-gnu-emacs@gnu.org; Sun, 15 Apr 2018 13:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f7loo-00033G-D3 for bug-gnu-emacs@gnu.org; Sun, 15 Apr 2018 13:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 15 Apr 2018 17:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19431 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19431-submit@debbugs.gnu.org id=B19431.152381468511671 (code B ref 19431); Sun, 15 Apr 2018 17:52:02 +0000 Original-Received: (at 19431) by debbugs.gnu.org; 15 Apr 2018 17:51:25 +0000 Original-Received: from localhost ([127.0.0.1]:54418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f7loD-00032B-7d for submit@debbugs.gnu.org; Sun, 15 Apr 2018 13:51:25 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:37845) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f7loA-000322-LX for 19431@debbugs.gnu.org; Sun, 15 Apr 2018 13:51:23 -0400 Original-Received: from 46.67.12.60.tmi.telenormobil.no ([46.67.12.60] helo=corrigan) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1f7lo7-0007Bs-IN; Sun, 15 Apr 2018 19:51:21 +0200 Original-Received: from larsi by corrigan with local (Exim 4.89) (envelope-from ) id 1f7lo2-0004GU-0D; Sun, 15 Apr 2018 19:51:14 +0200 In-Reply-To: (Enrico Scholz's message of "Mon, 22 Dec 2014 16:10:56 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:145395 Archived-At: Enrico Scholz writes: > 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?= ") > (decoded (rfc2047-decode-string address))) > ; show output with encoded umlauts and non-RFC2047 header > (print (mail-extract-address-components "\"Baer, Klaus\" ")) > (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))) Yes, that's a very confusing and not very useful function. I've now updated the doc string to point to `mail-header-parse-address', which is the function that should be used to parse address headers, and does the right thing also on German addresses. I don't think it's worth trying to fix the mess that is `mail-extract-address-components'. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no