X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=handler.c;h=251f4795ec0352ec78485f4aaefe99b14ced8bb6;hb=be2ccfaadec4e4f6e059007247c18ffb372a05a4;hp=1b0f5a6a301f40f401dad17fab3020ea07eb7619;hpb=f404a0ca916be07049af51a3022baaaaab94def6;p=apps%2Fmadmutt.git diff --git a/handler.c b/handler.c index 1b0f5a6..251f479 100644 --- a/handler.c +++ b/handler.c @@ -1211,8 +1211,6 @@ static void print_flowed_line(char * line, STATE *s,int ql) { int len = strlen(line); int i; - fprintf(stderr,"prefix = `%s'\n",s->prefix); - width = COLS - WrapMargin - ql - 1; if (option(OPTSTUFFQUOTED)) --width; @@ -1872,11 +1870,21 @@ void mutt_decode_attachment (BODY *b, STATE *s) Quotebuf[0] = '\0'; - if (istext && s->flags & M_CHARCONV) + if (istext) { - char *charset = mutt_get_parameter ("charset", b->parameter); - if (charset && Charset) - cd = mutt_iconv_open (Charset, charset, M_ICONV_HOOK_FROM); + if(s->flags & M_CHARCONV) + { + char *charset = mutt_get_parameter ("charset", b->parameter); + if (!option (OPTSTRICTMIME) && !charset) + charset = mutt_get_first_charset (AssumedCharset); + if (charset && Charset) + cd = mutt_iconv_open (Charset, charset, M_ICONV_HOOK_FROM); + } + else + { + if (b->file_charset) + cd = mutt_iconv_open (Charset, b->file_charset, M_ICONV_HOOK_FROM); + } } fseek (s->fpin, b->offset, 0);