Changeset 4963:5fc8c7cee1dd for charset.c
Legend:
- Unmodified
- Added
- Removed
-
charset.c
r4961 r4963 130 130 { "ISO_8859-5", "iso-8859-5" }, 131 131 { "cyrillic", "iso-8859-5" }, 132 { "csISOLatinCyrillic", "iso 8859-5" },132 { "csISOLatinCyrillic", "iso-8859-5" }, 133 133 134 134 { "ISO_8859-9:1989", "iso-8859-9" }, … … 151 151 152 152 { "Extended_UNIX_Code_Packed_Format_for_Japanese", 153 " EUC-JP" },153 "euc-jp" }, 154 154 { "csEUCPkdFmtJapanese", 155 " EUC-JP" },155 "euc-jp" }, 156 156 157 157 { "csGB2312", "gb2312" }, … … 322 322 * charset-hooks, recanonicalises, and finally applies iconv-hooks. 323 323 * Parameter flags=0 skips charset-hooks, while M_ICONV_HOOK_FROM 324 * applies them to fromcode. 324 * applies them to fromcode. Callers should use flags=0 when fromcode 325 * can safely be considered true, either some constant, or some value 326 * provided by the user; M_ICONV_HOOK_FROM should be used only when 327 * fromcode is unsure, taken from a possibly wrong incoming MIME label, 328 * or such. Misusing M_ICONV_HOOK_FROM leads to unwanted interactions 329 * in some setups. Note: By design charset-hooks should never be, and 330 * are never, applied to tocode. Highlight note: The top-well-named 331 * M_ICONV_HOOK_FROM acts on charset-hooks, not at all on iconv-hooks. 325 332 */ 326 333 … … 336 343 /* transform to MIME preferred charset names */ 337 344 mutt_canonical_charset (tocode1, sizeof (tocode1), tocode); 338 339 #ifdef M_ICONV_HOOK_TO340 /* Not used. */341 if ((flags & M_ICONV_HOOK_TO) && (tmp = mutt_charset_hook (tocode1)))342 mutt_canonical_charset (tocode1, sizeof (tocode1), tmp);343 #endif344 345 345 mutt_canonical_charset (fromcode1, sizeof (fromcode1), fromcode); 346 346 … … 439 439 /* 440 440 * Convert a string 441 * Used in rfc2047.c and rfc2231.c 441 * Used in rfc2047.c, rfc2231.c, crypt-gpgme.c, mutt_idna.c, and more. 442 * Parameter flags is given as-is to mutt_iconv_open(). See there 443 * for its meaning and usage policy. 442 444 */ 443 445 … … 512 514 }; 513 515 516 /* 517 * Parameter flags is given as-is to mutt_iconv_open(). See there 518 * for its meaning and usage policy. 519 */ 514 520 FGETCONV *fgetconv_open (FILE *file, const char *from, const char *to, int flags) 515 521 {
