From: Thomas Roessler Date: Tue, 28 Aug 2001 20:39:04 +0000 (+0000) Subject: Don't do character conversion when we call an external handler for a X-Git-Tag: mutt-1-3-22-rel~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=83862c478eba2a643a0e5fdd555b18d289aaa355;p=mutt Don't do character conversion when we call an external handler for a text type. Assume that the conversion is done there. --- diff --git a/handler.c b/handler.c index 5e50bdb5..bfaa867b 100644 --- a/handler.c +++ b/handler.c @@ -1694,6 +1694,8 @@ void mutt_body_handler (BODY *b, STATE *s) size_t tmplength = 0; char type[STRING]; + int oflags = s->flags; + /* first determine which handler to use to process this part */ snprintf (type, sizeof (type), "%s/%s", TYPE (b), b->subtype); @@ -1702,7 +1704,10 @@ void mutt_body_handler (BODY *b, STATE *s) rfc1524_entry *entry = rfc1524_new_entry (); if (rfc1524_mailcap_lookup (b, type, entry, M_AUTOVIEW)) - handler = autoview_handler; + { + handler = autoview_handler; + s->flags &= ~M_CHARCONV; + } rfc1524_free_entry (&entry); } else if (b->type == TYPETEXT) @@ -1814,7 +1819,7 @@ void mutt_body_handler (BODY *b, STATE *s) if ((s->fpout = safe_fopen (tempfile, "w")) == NULL) { mutt_error _("Unable to open temporary file!"); - return; + goto bail; } /* decoding the attachment changes the size and offset, so save a copy * of the "real" values now, and restore them after processing @@ -1883,4 +1888,7 @@ void mutt_body_handler (BODY *b, STATE *s) } fputs (" --]\n", s->fpout); } + + bail: + s->flags = oflags; }