diff options
author | TAKIZAWA Takashi <taki@luna.email.ne.jp> | 2007-02-24 07:01:24 +0000 |
---|---|---|
committer | TAKIZAWA Takashi <taki@luna.email.ne.jp> | 2007-02-24 07:01:24 +0000 |
commit | f2899f953c4ef0fcba4fd88d454276965364b77a (patch) | |
tree | 3006a3ccbb0cd6846aa724f007b67409321a2eac /handler.c | |
parent | 9b2c2b8e53b624b86de29be021a7d126868dff61 (diff) |
Add $assumed_charset, $file_charset and $strict_mime.
Diffstat (limited to 'handler.c')
-rw-r--r-- | handler.c | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -1743,11 +1743,21 @@ void mutt_decode_attachment (BODY *b, STATE *s) int istext = mutt_is_text_part (b); iconv_t cd = (iconv_t)(-1); - 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); + } } fseeko (s->fpin, b->offset, 0); |