From 59a0e6cff19c553ec1e0f2738f0357454e80c5d8 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Fri, 24 Aug 2001 08:07:42 +0000 Subject: [PATCH] Don't use the 7bit encoding for non-text MIME types. This may produce slightly longer messages, but it helps to avoid corruption with binary attachments which look like text, but aren't. --- sendlib.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sendlib.c b/sendlib.c index 03adda66..022fbd25 100644 --- a/sendlib.c +++ b/sendlib.c @@ -1195,8 +1195,11 @@ static void mutt_set_encoding (BODY *b, CONTENT *info) else b->encoding = ENC7BIT; } - else if (info->lobin || info->hibin || info->binary || info->linemax > 990 + else +#if 0 + if (info->lobin || info->hibin || info->binary || info->linemax > 990 || info->cr || (/* option (OPTENCODEFROM) && */ info->from)) +#endif { /* Determine which encoding is smaller */ if (1.33 * (float)(info->lobin+info->hibin+info->ascii) < @@ -1205,8 +1208,10 @@ static void mutt_set_encoding (BODY *b, CONTENT *info) else b->encoding = ENCQUOTEDPRINTABLE; } +#if 0 else b->encoding = ENC7BIT; +#endif } void mutt_stamp_attachment(BODY *a) -- 2.40.0