* epg.el (epg-list-keys): Parse GnuPG's print_string escape.
authorueno <ueno>
Thu, 8 Mar 2007 05:10:04 +0000 (05:10 +0000)
committerueno <ueno>
Thu, 8 Mar 2007 05:10:04 +0000 (05:10 +0000)
ChangeLog
epg.el

index 5b45e79..96c1ed7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2007-03-08  Daiki Ueno  <ueno@unixuser.org>
 
+       * epg.el (epg-list-keys): Parse GnuPG's print_string escape.
+
+2007-03-08  Daiki Ueno  <ueno@unixuser.org>
+
        * epa-mail.el (epa-mail-mode-hook): New variable.
        (epa-mail-mode-on-hook): New variable.
        (epa-mail-mode-off-hook): New variable.
diff --git a/epg.el b/epg.el
index 659912a..d2bb20a 100644 (file)
--- a/epg.el
+++ b/epg.el
@@ -1667,6 +1667,7 @@ This function is for internal use only."
                      (unless (eq (epg-context-protocol context) 'CMS)
                        '("--fixed-list-mode"))
                      (if name (list name))))
+       (coding-system-for-read 'binary)
        keys string field index)
     (with-temp-buffer
       (apply #'call-process
@@ -1736,11 +1737,14 @@ signatures should be included."
                (if (aref (car lines) 1)
                    (cdr (assq (string-to-char (aref (car lines) 1))
                               epg-key-validity-alist)))
-               (if cert
-                   (condition-case nil
+               (condition-case nil
+                   (if cert
                        (epg-dn-from-string (aref (car lines) 9))
-                     (error (aref (car lines) 9)))
-                 (aref (car lines) 9)))
+                     (epg--decode-coding-string
+                      (car (read-from-string (concat "\"" (aref (car lines) 9)
+                                                     "\"")))
+                      'utf-8))
+                 (error (aref (car lines) 9))))
               (epg-key-user-id-list (car keys)))))
        ((equal (aref (car lines) 0) "fpr")
        (epg-sub-key-set-fingerprint (car (epg-key-sub-key-list (car keys)))