From: Thomas Roessler Date: Wed, 27 Mar 2002 00:11:55 +0000 (+0000) Subject: Fix "noconv" handling for the message body when we generate inline X-Git-Tag: mutt-1-5-1-rel~33 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=50ba31ab2f378a57882d652c2ec0ef2e3919beef;p=mutt Fix "noconv" handling for the message body when we generate inline PGP. --- diff --git a/pgp.c b/pgp.c index 09abc2ed..3d6f52c3 100644 --- a/pgp.c +++ b/pgp.c @@ -1253,6 +1253,7 @@ BODY *pgp_traditional_encryptsign (BODY *a, int flags, char *keylist) char pgperrfile[_POSIX_PATH_MAX]; char pgpinfile[_POSIX_PATH_MAX]; + char from_charset[STRING]; const char *send_charset; FILE *pgpout = NULL, *pgperr = NULL, *pgpin = NULL; @@ -1284,7 +1285,12 @@ BODY *pgp_traditional_encryptsign (BODY *a, int flags, char *keylist) return NULL; } - if (!mutt_is_us_ascii (Charset)) + if (a->noconv) + mutt_get_body_charset (from_charset, sizeof (from_charset), a); + else + strfcpy (from_charset, NONULL(Charset), sizeof (from_charset)); + + if (!mutt_is_us_ascii (from_charset)) { int c; FGETCONV *fc;