Subject: Re: bug#38512: 27.0.50; Reading PGP-signed email from people with non-ascii names give error

From: Adam Sjøgren <[email-masked]>
Date: Mon, 09 Dec 2019 18:08:33 +0100

Robert writes:

> 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)
>

I can confirm that this patch fixes the problem I reported.

  Thanks!

   Adam

-- 
 "Vegetarian?? Yecchh! I'm not a vegetarian!                Adam Sjøgren
  I'm a dessertarian."                                 [email-masked]