SEMI: pgg-gpg: garbled non-ascii message
Tatsuya Kinoshita
tats @ vega.ocn.ne.jp
2003年 8月 26日 (火) 22:17:48 JST
Yoichi's diary (http://yoichi.geiin.org/d/?date=20030824#p02)で
触れられている、pgg-verify-regionでGnuPGの日本語メッセージが化け
てしまうという問題、どう対処すべきなのでしょうか。
non-ASCIIメッセージがpgg-verify-region以外でも問題になるかもしれ
ないと思い、とりあえず手元では下記のようなパッチを抱えています。
([emacs-mime-ja:01440]の分もまとめて)
--
木下達也
2003-08-26 Tatsuya Kinoshita <tats @ vega.ocn.ne.jp>
* pgg-gpg.el (pgg-gpg-process-region): Set environment variables
LANGUAGE, LC_ALL, and LANG to "C" to prevent non-ascii problem.
2003-08-13 Tatsuya Kinoshita <tats @ vega.ocn.ne.jp>
* pgg-gpg.el (pgg-gpg-process-region): Specify "--charset iso-8859-1"
to GnuPG. (suggested by "Yoshinori K. Okuji" <okuji @ enbug.org> in
http://bugs.debian.org/150834)
(pgg-scheme-lookup-key): Ditto.
--- semi.orig/pgg-gpg.el
+++ semi/pgg-gpg.el
@@ -68,11 +68,16 @@
,@(if passphrase '("--passphrase-fd" "0"))
"--yes" ; overwrite
"--output" ,output-file-name
+ "--charset" "iso-8859-1"
, @ pgg-gpg-extra-args , @ args))
(output-buffer pgg-output-buffer)
(errors-buffer pgg-errors-buffer)
(process-connection-type nil)
+ (process-environment (copy-sequence process-environment))
process status exit-status)
+ (setenv "LANGUAGE" "C")
+ (setenv "LC_ALL" "C")
+ (setenv "LANG" "C")
(with-current-buffer (get-buffer-create errors-buffer)
(buffer-disable-undo)
(erase-buffer))
@@ -125,6 +130,7 @@
(luna-define-method pgg-scheme-lookup-key ((scheme pgg-scheme-gpg)
string &optional type)
(let ((args (list "--with-colons" "--no-greeting" "--batch"
+ "--charset" "iso-8859-1"
(if type "--list-secret-keys" "--list-keys")
string)))
(with-temp-buffer
More information about the Emacs-mime-ja
mailing list