From: Rocco Rutte Date: Tue, 26 May 2009 15:57:16 +0000 (+0200) Subject: Use charset parameter to view text attachments using . Closes #3234. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=db74dcf40c999bfc7602b77152b5649de09d6fa9;p=neomutt Use charset parameter to view text attachments using . Closes #3234. --- diff --git a/attach.c b/attach.c index 2eb231789..106d68f11 100644 --- a/attach.c +++ b/attach.c @@ -798,10 +798,12 @@ int mutt_save_attachment (FILE *fp, BODY *m, char *path, int flags, HEADER *hdr) else { /* In recv mode, extract from folder and decode */ - + STATE s; - + memset (&s, 0, sizeof (s)); + s.flags |= M_CHARCONV; + if ((s.fpout = mutt_save_attachment_open (path, flags)) == NULL) { mutt_perror ("fopen"); @@ -810,7 +812,7 @@ int mutt_save_attachment (FILE *fp, BODY *m, char *path, int flags, HEADER *hdr) } fseeko ((s.fpin = fp), m->offset, 0); mutt_decode_attachment (m, &s); - + if (fclose (s.fpout) != 0) { mutt_perror ("fclose");