Gnus development mailing list
 help / color / mirror / Atom feed
From: michael@cadilhac.name (Michaël Cadilhac)
To: ding@gnus.org
Subject: GPG --status-fd outputs in UTF-8.
Date: Wed, 07 Mar 2007 19:22:08 +0100	[thread overview]
Message-ID: <87ps7k9anj.fsf@lrde.org> (raw)


[-- 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 --]

             reply	other threads:[~2007-03-07 18:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-07 18:22 Michaël Cadilhac [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ps7k9anj.fsf@lrde.org \
    --to=michael@cadilhac.name \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).