From: Thomas Roessler Date: Mon, 14 Feb 2000 15:52:23 +0000 (+0000) Subject: Fix encoding for text/* attachments with long lines. X-Git-Tag: mutt-1-1-4-rel~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=55ec58aafbaadd60dad947f127a53b1c967f7930;p=mutt Fix encoding for text/* attachments with long lines. --- diff --git a/sendlib.c b/sendlib.c index b0ffdfff..2f1574c0 100644 --- a/sendlib.c +++ b/sendlib.c @@ -860,7 +860,7 @@ static void mutt_set_encoding (BODY *b, CONTENT *info) { if (b->type == TYPETEXT) { - if (info->lobin || (info->from && option (OPTENCODEFROM))) + if (info->lobin || info->linemax > 990 || (info->from && option (OPTENCODEFROM))) b->encoding = ENCQUOTEDPRINTABLE; else if (info->hibin) b->encoding = option (OPTALLOW8BIT) ? ENC8BIT : ENCQUOTEDPRINTABLE; @@ -883,7 +883,8 @@ static void mutt_set_encoding (BODY *b, CONTENT *info) || info->cr || (option (OPTENCODEFROM) && info->from)) { /* Determine which encoding is smaller */ - if (1.33 * (float)(info->lobin+info->hibin+info->ascii) < 3.0 * (float) (info->lobin + info->hibin) + (float)info->ascii) + if (1.33 * (float)(info->lobin+info->hibin+info->ascii) < + 3.0 * (float)(info->lobin + info->hibin) + (float)info->ascii) b->encoding = ENCBASE64; else b->encoding = ENCQUOTEDPRINTABLE;