Changeset 5477:fb77465af534 for charset.c
Legend:
- Unmodified
- Added
- Removed
-
charset.c
r5453 r5477 630 630 FREE (_fc); /* __FREE_CHECKED__ */ 631 631 } 632 633 int mutt_check_charset (const char *s, int strict) 634 { 635 int i; 636 iconv_t cd; 637 638 if (mutt_is_utf8 (s)) 639 return 0; 640 641 if (!strict) 642 for (i = 0; PreferredMIMENames[i].key; i++) 643 { 644 if (ascii_strcasecmp (PreferredMIMENames[i].key, s) == 0 || 645 ascii_strcasecmp (PreferredMIMENames[i].pref, s) == 0) 646 return 0; 647 } 648 649 if ((cd = mutt_iconv_open (s, s, 0)) != (iconv_t)(-1)) 650 { 651 iconv_close (cd); 652 return 0; 653 } 654 655 return -1; 656 }
