From 1c1c844ee438e8e4fafa0eb4ceca104b9d31e8c8 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Sun, 20 May 2001 22:35:29 +0000 Subject: [PATCH] =?utf8?q?Fix=20character=20set=20conversion=20for=20non-p?= =?utf8?q?lain=20text=20types=20with=208bit=20content-transfer-encodings.?= =?utf8?q?=20=20Noted=20by=20Bj=C3=B6rn=20Jacke.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- handler.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/handler.c b/handler.c index c41e50b1..8fcfe5cf 100644 --- a/handler.c +++ b/handler.c @@ -238,7 +238,8 @@ void mutt_decode_quoted (STATE *s, long len, int istext, iconv_t cd) size_t l2; size_t l3; - state_set_prefix(s); + if (istext) + state_set_prefix(s); while (len > 0) { @@ -279,7 +280,8 @@ void mutt_decode_base64 (STATE *s, long len, int istext, iconv_t cd) buf[4] = 0; - if (istext) state_set_prefix(s); + if (istext) + state_set_prefix(s); while (len > 0) { @@ -1789,7 +1791,12 @@ void mutt_body_handler (BODY *b, STATE *s) /* see if we need to decode this part before processing it */ if (b->encoding == ENCBASE64 || b->encoding == ENCQUOTEDPRINTABLE || - b->encoding == ENCUUENCODED || plaintext) + b->encoding == ENCUUENCODED || plaintext || + mutt_is_text_type (b->type, b->subtype)) /* text subtypes may + * require character + * set conversion even + * with 8bit encoding. + */ { int origType = b->type; char *savePrefix = NULL; -- 2.40.0