From: Edmund GRIMLEY EVANS Date: Fri, 31 May 2002 16:58:55 +0000 (+0000) Subject: Fix charset-hook. X-Git-Tag: mutt-1-5-2-rel~84 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dad3f8377ac1f5f273771f4722ee839fc640b273;p=mutt Fix charset-hook. --- diff --git a/charset.c b/charset.c index 38b6edbd..86e7a3c7 100644 --- a/charset.c +++ b/charset.c @@ -314,8 +314,12 @@ iconv_t mutt_iconv_open (const char *tocode, const char *fromcode, int flags) iconv_t cd; mutt_canonical_charset (tocode1, sizeof (tocode1), tocode); + +#ifdef M_ICONV_HOOK_TO + /* Not used. */ if ((flags & M_ICONV_HOOK_TO) && (tmp = mutt_charset_hook (tocode1))) mutt_canonical_charset (tocode1, sizeof (tocode1), tmp); +#endif mutt_canonical_charset (fromcode1, sizeof (fromcode1), fromcode); if ((flags & M_ICONV_HOOK_FROM) && (tmp = mutt_charset_hook (fromcode1))) diff --git a/charset.h b/charset.h index 09f6afb5..fa2f20e5 100644 --- a/charset.h +++ b/charset.h @@ -36,6 +36,8 @@ void fgetconv_close (FGETCONV **); void mutt_set_langinfo_charset (void); #define M_ICONV_HOOK_FROM 1 +#if 0 #define M_ICONV_HOOK_TO 2 +#endif #endif /* _CHARSET_H */ diff --git a/sendlib.c b/sendlib.c index 64a87060..2a16002d 100644 --- a/sendlib.c +++ b/sendlib.c @@ -507,7 +507,7 @@ int mutt_write_mime_body (BODY *a, FILE *f) if (a->type == TYPETEXT && (!a->noconv)) fc = fgetconv_open (fpin, Charset, mutt_get_body_charset (send_charset, sizeof (send_charset), a), - M_ICONV_HOOK_TO); + 0); else fc = fgetconv_open (fpin, 0, 0, 0); @@ -694,7 +694,7 @@ static size_t convert_file_to (FILE *file, const char *fromcode, CONTENT_STATE *states; size_t *score; - cd1 = mutt_iconv_open ("UTF-8", fromcode, M_ICONV_HOOK_FROM); + cd1 = mutt_iconv_open ("UTF-8", fromcode, 0); if (cd1 == (iconv_t)(-1)) return -1;