Re: 1.5.7 BUG: character set in traditional PGP
On Thu, Feb 10, 2005 at 01:52:16PM +0100, Matthias Andree wrote:
> On Thu, 10 Feb 2005, Thomas Roessler wrote:
>
> > The problem here is that OpenPGP specifies text as being utf-8.
> > That's what mutt expects to come out of PGP when it decrypts.
> >
> > The lesson: When combining Umlauts and PGP, please use PGP/MIME.
>
> I don't care for any lessons.
>
> The sender has properly declared the character set for traditional PGP
> (i. e. as MIME header, as shown), I told mutt to decode traditional PGP,
> so the assumption "UTF-8" as though the input had been OpenPGP,
> PGP/MIME, whatever, is bogus: mutt needs to tell GnuPG "pass through
> unchanged" and then use the character set from the mime Content-Type
> header.
IIRC, ja-patch does it. Maybe this (attached) snippet helps you.
But I don't think this will be included into the CVS code. :)
--
tamo
Index: pgp.c
===================================================================
RCS file: /home/roessler/cvs/mutt/pgp.c,v
retrieving revision 3.39
diff -u -r3.39 pgp.c
--- pgp.c 3 Feb 2005 18:44:27 -0000 3.39
+++ pgp.c 10 Feb 2005 12:56:01 -0000
@@ -380,13 +380,6 @@
}
}
}
-
-
- /*
- * Now, copy cleartext to the screen. NOTE - we expect that PGP
- * outputs utf-8 cleartext. This may not always be true, but it
- * seems to be a reasonable guess.
- */
if(s->flags & M_DISPLAY)
{
@@ -410,7 +403,7 @@
int c;
rewind (pgpout);
state_set_prefix (s);
- fc = fgetconv_open (pgpout, "utf-8", Charset, 0);
+ fc = fgetconv_open (pgpout, body_charset, Charset, 0);
while ((c = fgetconv (fc)) != EOF)
state_prefix_putc (c, s);
fgetconv_close (&fc);