From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/64399 Path: news.gmane.org!not-for-mail From: michael@cadilhac.name (=?iso-8859-1?Q?Micha=EBl?= Cadilhac) Newsgroups: gmane.emacs.gnus.general Subject: Re: GPG --status-fd outputs in UTF-8. Date: Mon, 12 Mar 2007 18:28:31 +0100 Organization: Epita/LRDE Message-ID: <873b4ae5hc.fsf@lrde.org> References: <87ps7k9anj.fsf@lrde.org> <526bd3a0-07d1-4009-976f-bf692643d34d@well-done.deisui.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: sea.gmane.org 1173720576 25706 80.91.229.12 (12 Mar 2007 17:29:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 12 Mar 2007 17:29:36 +0000 (UTC) Cc: ding@gnus.org To: Daiki Ueno Original-X-From: ding-owner+M12923@lists.math.uh.edu Mon Mar 12 18:29:28 2007 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1HQoKp-0002KB-WC for ding-account@gmane.org; Mon, 12 Mar 2007 18:29:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1HQoKI-0002pt-IM; Mon, 12 Mar 2007 12:28:50 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1HQoKG-0002pc-K0 for ding@lists.math.uh.edu; Mon, 12 Mar 2007 12:28:48 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.63) (envelope-from ) id 1HQoK9-0006pm-Cb for ding@lists.math.uh.edu; Mon, 12 Mar 2007 12:28:48 -0500 Original-Received: from smtp3-g19.free.fr ([212.27.42.29]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1HQoK7-000739-00 for ; Mon, 12 Mar 2007 18:28:39 +0100 Original-Received: from localhost (ivr94-6-82-230-255-91.fbx.proxad.net [82.230.255.91]) by smtp3-g19.free.fr (Postfix) with ESMTP id AB11F2455E; Mon, 12 Mar 2007 18:28:38 +0100 (CET) X-Website: http://michael.cadilhac.name Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEVWPh+Tai+5r5YKBAEU CQQzGAtiq7gjAAACR0lEQVQ4jW2UzW7lIAyFzVW8BzTZX5DmCZLuU2H2pMXv/ypzbK7aSh2kRCRf /HNsE0q7Sg+RQ7JFKaqtrRNAl5AIIKe6D5DBqgbmUAe5hBI1wIRFAHjeM0RKtZi7XVVEpb0BSNfA IddChChT5DildSLWOWhY5IEItMnncZgFcUAc/5jjwCMsDosRNdfKPDTFEdVBW8C+RebDb4N5Orio RhM1+11IJyx0ng2+LryFHBMPDQDYHrY6IfGuU3ouiXTQNE8LIJDKOWpNxERTFrggQwRPd7USUsTW fJ0XbR3bdj5KgBYy4SACpxDeUYEUAzLmtJ1iIrD2gczPq8Qomjhsh/RjGIgKIO8p7NITjwlx7WID nsnQe5NeuTvoBpi8LX6vLLOh5icjOHqBypgnuSp7M+RE1agbQKHQr5E2z1WObhYW4gMqeGQL7joM jCf2DxSk5ApADSYHfFF4igNfJZL1z0GKP0FN02s4XiDXr7V5P94W6I9v8MfBOQDmfwAaVYt+x8Da v4DJvX8BAdin3Knm5yMZYAO4ABDkDniZLLfi4P40gP1F0TPGZOu0CGwA1lcowxwlGy6A9705mD0V jHCxwVZT/hYdRJVUGZNlx6l7ScQBTluof6Wj6bsPYlvpwoTvXFD9gHPn2TZPF3ntI2ecxVrW5MrV XiCie5EeNa7BlWu/HNSkprDUva163PHxAv5jyGV7gVzyAghSKOTnat85UIYFICXbD2NV9rRiv0BS tKQsg6OHH4A15F1WW+UHKHHa32h6aPnAm3/pUcWp+WYnTQAAAABJRU5ErkJggg== In-Reply-To: <526bd3a0-07d1-4009-976f-bf692643d34d@well-done.deisui.org> (Daiki Ueno's message of "Thu\, 08 Mar 2007 07\:06\:31 +0900") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.95 (gnu/linux) X-Spam-Score: -2.4 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:64399 Archived-At: --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Daiki Ueno writes: >>>>>> In <87ps7k9anj.fsf@lrde.org>=20 >>>>>> michael@cadilhac.name (Micha=EBl Cadilhac) wrote: >> (setq process >> (apply #'start-process "pgg-gpg" buffer pgg-gpg-program args))) >> (set-default-file-modes orig-mode)) >> + (set-process-coding-system process 'utf-8) > > At least, this change will cause a problem on encryption, if the > plain text is encoded in non-UTF-8 encoding. You're right, sorry. Maybe the following? --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=pgg-gpg.patch --- pgg-gpg.el 02 Mar 2007 00:43:33 +0100 7.27 +++ pgg-gpg.el 12 Mar 2007 18:24:20 +0100 @@ -120,7 +120,7 @@ (beginning-of-line) (while (looking-at ".*\n") ;the input line is finished (save-excursion - (if (looking-at "\\[GNUPG:] \\([A-Z_]+\\)\\>.*") + (if (looking-at "\\[GNUPG:] \\([A-Z_]+\\)\\> ?\\(.*\\)") (let* ((status (match-string 1)) (symbol (intern-soft (concat "pgg-gpg-status-" status)))) @@ -128,8 +128,12 @@ (setq pgg-gpg-pending-status-list nil)) (if (and symbol (fboundp symbol)) - (funcall symbol process (buffer-substring - (match-beginning 1) - (match-end 0))))))) + (funcall symbol process + ;; Status value is in UTF-8. + (decode-coding-string + (encode-coding-string + (match-string 2) + (car (process-coding-system process))) + 'utf-8)))))) (forward-line)) (setq pgg-gpg-read-point (point))))) --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=egp.patch *** epg.el 2007-01-06 00:43:25.000000000 +0100 --- epg.el 2007-03-12 18:14:05.000000000 +0100 *************** *** 1136,1142 **** (while (looking-at ".*\n") ;the input line finished (if (looking-at "\\[GNUPG:] \\([A-Z_]+\\) ?\\(.*\\)") (let* ((status (match-string 1)) ! (string (match-string 2)) (symbol (intern-soft (concat "epg--status-" status)))) (if (member status epg-pending-status-list) --- 1136,1147 ---- (while (looking-at ".*\n") ;the input line finished (if (looking-at "\\[GNUPG:] \\([A-Z_]+\\) ?\\(.*\\)") (let* ((status (match-string 1)) ! ;; Status value is in UTF-8. ! (string (decode-coding-string ! (encode-coding-string ! (match-string 2) ! (car (process-coding-system process))) ! 'utf-8)) (symbol (intern-soft (concat "epg--status-" status)))) (if (member status epg-pending-status-list) --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Thanks! =2D-=20 | Micha=EBl `Micha' Cadilhac | To be portable, = | | http://michael.cadilhac.name | Just stay on Windows. = | | JID/MSN: | = | `---- michael.cadilhac@gmail.com | -- A Microsoft Guy - = --' --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.2 (GNU/Linux) iD8DBQFF9Y3DUJhDmOfFA3URAmTwAKCj9BHWzZ3VkWKWAUvTroUaPc7cAQCguPZP s5KXiQta92xDaSC6iicOMsw= =U0Di -----END PGP SIGNATURE----- --==-=-=--