Gnus development mailing list
 help / color / mirror / Atom feed
* GPG --status-fd outputs in UTF-8.
@ 2007-03-07 18:22 Michaël Cadilhac
  2007-03-07 22:06 ` Daiki Ueno
  0 siblings, 1 reply; 5+ messages in thread
From: Michaël Cadilhac @ 2007-03-07 18:22 UTC (permalink / raw)
  To: ding


[-- Attachment #1.1: Type: text/plain, Size: 539 bytes --]

Hi!

It can be read from the DETAILS file of Gnupg the following :

,----
| Format of the "--status-fd" output
| ==================================
| Every line is prefixed with "[GNUPG:] ", followed by a keyword with
| the type of the status line and a some arguments depending on the
| type (maybe none)[...]
|         The username is the primary one encoded in UTF-8
`----

To be consistent with the rest of gpg(1)'s output, it would be good to
ask Gnupg to output everything in UTF-8 and treat the buffer as such.

Here's a proposal :

[-- Attachment #1.2: pgg-gpg.patch --]
[-- Type: text/x-patch, Size: 1466 bytes --]

Index: lisp/pgg-gpg.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/pgg-gpg.el,v
retrieving revision 7.27
diff -B -w -c -r7.27 pgg-gpg.el
*** lisp/pgg-gpg.el	1 Mar 2007 23:43:33 -0000	7.27
--- lisp/pgg-gpg.el	7 Mar 2007 18:09:13 -0000
***************
*** 72,77 ****
--- 72,78 ----
    (let* ((output-file-name (pgg-make-temp-file "pgg-output"))
  	 (args
  	  (append (list "--no-tty"
+ 			"--display-charset" "utf-8"
  			"--status-fd" "1"
  			"--command-fd" "0"
  			"--yes" ; overwrite
***************
*** 101,106 ****
--- 102,108 ----
  	  (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)
      (set-process-filter process #'pgg-gpg-process-filter)
      (set-process-sentinel process #'pgg-gpg-process-sentinel)
      process))
Index: lisp/ChangeLog
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/ChangeLog,v
retrieving revision 7.1503
diff -C0 -r7.1503 ChangeLog
*** lisp/ChangeLog	6 Mar 2007 05:16:37 -0000	7.1503
--- lisp/ChangeLog	7 Mar 2007 18:09:28 -0000
***************
*** 0 ****
--- 1,5 ----
+ 2007-03-07  Michaël Cadilhac  <michael@cadilhac.name>
+ 
+ 	* pgg-gpg.el (pgg-gpg-start-process): Ask Gnupg to output everything in
+ 	UTF-8, and treat it as such.
+ 

[-- Attachment #1.3: Type: text/plain, Size: 434 bytes --]


Thanks in advance ! (Well, I have to admit, I didn't like to see
« Michaël » spelled « Michaël » :-))

-- 
 |   Michaël `Micha' Cadilhac       |  Pour les 35-40 ans, l'humour          |
 |   http://michael.cadilhac.name   |       c'est une plus-value.            |
 |   JID/MSN:                       |          -- Guillaume L.               |
 `----  michael.cadilhac@gmail.com  |                                   -  --'

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-03-19  1:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-07 18:22 GPG --status-fd outputs in UTF-8 Michaël Cadilhac
2007-03-07 22:06 ` Daiki Ueno
2007-03-08  1:26   ` Daiki Ueno
2007-03-12 17:28   ` Michaël Cadilhac
2007-03-19  1:21     ` Daiki Ueno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).