From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#38512: 27.0.50; Reading PGP-signed email from people with non-ascii names give error Date: Mon, 09 Dec 2019 17:26:08 +0100 Message-ID: References: <87v9qtfame.fsf@tullinup.koldfront.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="223947"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Lars Ingebrigtsen , 38512@debbugs.gnu.org To: Adam =?UTF-8?Q?Sj=C3=B8gren?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 09 17:27:14 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ieLsO-000w3D-RG for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Dec 2019 17:27:12 +0100 Original-Received: from localhost ([::1]:42302 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ieLsM-00036o-Pq for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Dec 2019 11:27:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34033) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ieLsF-00036d-4F for bug-gnu-emacs@gnu.org; Mon, 09 Dec 2019 11:27:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ieLsD-0004XB-WA for bug-gnu-emacs@gnu.org; Mon, 09 Dec 2019 11:27:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48359) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ieLsD-0004WR-SI for bug-gnu-emacs@gnu.org; Mon, 09 Dec 2019 11:27:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ieLsD-00084L-Mn; Mon, 09 Dec 2019 11:27:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87v9qtfame.fsf@tullinup.koldfront.dk> Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Mon, 09 Dec 2019 16:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38512 X-GNU-PR-Package: emacs,gnus Original-Received: via spool by 38512-submit@debbugs.gnu.org id=B38512.157590877930965 (code B ref 38512); Mon, 09 Dec 2019 16:27:01 +0000 Original-Received: (at 38512) by debbugs.gnu.org; 9 Dec 2019 16:26:19 +0000 Original-Received: from localhost ([127.0.0.1]:54331 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ieLrX-00083N-3L for submit@debbugs.gnu.org; Mon, 09 Dec 2019 11:26:19 -0500 Original-Received: from mail-wm1-f41.google.com ([209.85.128.41]:32908) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ieLrU-000839-Ro for 38512@debbugs.gnu.org; Mon, 09 Dec 2019 11:26:17 -0500 Original-Received: by mail-wm1-f41.google.com with SMTP id y23so271725wma.0 for <38512@debbugs.gnu.org>; Mon, 09 Dec 2019 08:26:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:message-id :mime-version:content-transfer-encoding; bh=Q+SHpWFmiDlknaqFHZuQtaE4MoYsobzuja9eUZXPr/4=; b=fCLe+xd7xne1K5CWqk451yRl1fitbAG7X7dUnb32mWayzWMb0VoZmO/14GmwpFCDsi q0EX7nbJHASeZed0Wzsg1eKmBrF2ACuZMhIqUcJ0jsjP9bfTXTKUa7hKTILUU+hMMFQO lz3AuUkYo4TM0UnKrkIaE3+sU1zyoMPIvgBOShOYqU9KLmM5lSnRY6OpP7l0cRN/EMUN xS1dgqhb3LBlsXwao9LzVa03jQuDf8cA1kVlTwQYJq5QcWlX8QG9aHx4+QdBG/2dYw4g PYmFZuAvRdRhF8Yhvqmk/bhnQv408Bwq2kFcQE5qeRy59qgLEucqyLUCsriUhzZFwKZI pXnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:message-id:mime-version :content-transfer-encoding; bh=Q+SHpWFmiDlknaqFHZuQtaE4MoYsobzuja9eUZXPr/4=; b=SaQMds7L1u6nYZ4r7mlectdT8FbEtQZjVyLgj4YWQv0qS1qtX+1D7nPqJXCXKc6VoQ TU26ElxcS0esVgjwoOPU/vZUL4FFiDCnitaXbqDvPlVeKrDQvm0Vab+Tv05wEw0KPoyM eMuRHLiNHLuCLU8oxVXQbrQEqcDbuhWUj9vQlYDkFE61F1PRwd5I+GYcqqY3JPDzgCFy eeuljmPHle9NCPSdpqdWCHGGakz9BuX0bwFrvIW9meMyVXjit+pC2S1QOFhZ1osqkQ/h bELpia5qh13LbHDRIKyd8DlAtnaMMmAn4mh2AVUdGS/2vEqwvbydaRbUJkh0NG7acg40 iBwQ== X-Gm-Message-State: APjAAAXbVFRfhPjFz24/n/0RbCuEXzx8FBAEnSbNgzvANJjKextQFp/K nyP8ivGHF6Ikg8bVQNROY5o= X-Google-Smtp-Source: APXvYqwT3f5bnK2Cqu8RfOQDETlou4/ZeE8kFFuP/1dkoofxfX8cpRmFhZGUmmrfOzv6xnV+Eb2PJQ== X-Received: by 2002:a1c:cc06:: with SMTP id h6mr8486500wmb.118.1575908770737; Mon, 09 Dec 2019 08:26:10 -0800 (PST) Original-Received: from rpluim-mac ([2a01:e34:ecfc:a860:a09f:72be:424f:bc33]) by smtp.gmail.com with ESMTPSA id d16sm30138461wrg.27.2019.12.09.08.26.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2019 08:26:09 -0800 (PST) Gmane-Reply-To-List: yes 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: 209.51.188.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:173113 Archived-At: >>>>> On Fri, 06 Dec 2019 21:43:37 +0100, "Adam Sj=C3=B8gren " said: Adam> Recently, when I read an email that has been PGP-signed and/or en= crypted Adam> by a person who has non-ascii chars in their name in the PGP-key,= Gnus Adam> gives an error on the email, showing this message: Adam> epg--decode-percent-escape: Can=E2=80=99t convert the 8th chara= cter to unibyte Adam> This also means I can't read encrypted emails I have sent myself. Adam> I have bisected the problem to this commit: Adam> 98387b9e2455b0bd5a2aafe6fac939fb111eedce is the first bad commit Adam> commit 98387b9e2455b0bd5a2aafe6fac939fb111eedce Adam> Author: Lars Ingebrigtsen Adam> Date: Wed Oct 23 10:50:29 2019 +0200 Adam> Make display of S/MIME signatures slightly better Adam> * lisp/epg.el (epg-signature-to-string): Decode percent esc= apes Adam> (bug#36101). Adam> lisp/epg.el | 2 +- Adam> 1 file changed, 1 insertion(+), 1 deletion(-) If I remember correctly what Eli taught me the last time this kind of discussion came up, this should fix it: diff --git a/lisp/epg.el b/lisp/epg.el index 090317f422..5466716e34 100644 --- a/lisp/epg.el +++ b/lisp/epg.el @@ -2032,7 +2032,7 @@ epg-edit-key (epg-reset context))) =20 (defun epg--decode-percent-escape (string) - (setq string (string-to-unibyte string)) + (setq string (encode-coding-string string 'raw-text)) (let ((index 0)) (while (string-match "%\\(\\(%\\)\\|\\([[:xdigit:]][[:xdigit:]]\\)\\)" string index)