GNU bug report logs -
#38512
27.0.50; Reading PGP-signed email from people with non-ascii names give error
Previous Next
Reported by: Adam Sjøgren <asjo <at> koldfront.dk>
Date: Fri, 6 Dec 2019 20:44:02 UTC
Severity: normal
Tags: fixed
Found in version 27.0.50
Fixed in version 27.1
Done: Robert Pluim <rpluim <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 38512 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Fri, 06 Dec 2019 21:43:37 +0100, "Adam Sjøgren <asjo <at> koldfront.dk>" said:
Adam> Recently, when I read an email that has been PGP-signed and/or encrypted
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’t convert the 8th character 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 <larsi <at> gnus.org>
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 escapes
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)))
(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)
This bug report was last modified 5 years and 223 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.