Changeset 2371:62965bc72607 for charset.c
Legend:
- Unmodified
- Added
- Removed
-
charset.c
r2368 r2371 174 174 { "latin9", "iso-8859-15" }, /* this is not a bug */ 175 175 176 { "�59-9", "iso-8859-9" }, /* work around a problem:177 * In iso-8859-9, the lower-178 * case version of I is � * not i.179 */180 181 176 182 177 /* … … 247 242 248 243 /* catch some common iso-8859-something misspellings */ 249 if (! mutt_strncasecmp (name, "8859", 4) && name[4] != '-')244 if (!ascii_strncasecmp (name, "8859", 4) && name[4] != '-') 250 245 snprintf (scratch, sizeof (scratch), "iso-8859-%s", name +4); 251 else if (! mutt_strncasecmp (name, "8859-", 5))246 else if (!ascii_strncasecmp (name, "8859-", 5)) 252 247 snprintf (scratch, sizeof (scratch), "iso-8859-%s", name + 5); 253 else if (! mutt_strncasecmp (name, "iso8859", 7) && name[7] != '-')248 else if (!ascii_strncasecmp (name, "iso8859", 7) && name[7] != '-') 254 249 snprintf (scratch, sizeof (scratch), "iso_8859-%s", name + 7); 255 else if (! mutt_strncasecmp (name, "iso8859-", 8))250 else if (!ascii_strncasecmp (name, "iso8859-", 8)) 256 251 snprintf (scratch, sizeof (scratch), "iso_8859-%s", name + 8); 257 252 else … … 259 254 260 255 for (i = 0; PreferredMIMENames[i].key; i++) 261 if (!mutt_strcasecmp (scratch, PreferredMIMENames[i].key)) 256 if (!ascii_strcasecmp (scratch, PreferredMIMENames[i].key) || 257 !mutt_strcasecmp (scratch, PreferredMIMENames[i].key)) 262 258 { 263 259 strfcpy (dest, PreferredMIMENames[i].pref, dlen); … … 269 265 /* for cosmetics' sake, transform to lowercase. */ 270 266 for (p = dest; *p; p++) 271 if (isupper (*p)) 272 *p = tolower (*p); 267 *p = ascii_tolower (*p); 273 268 } 274 269 … … 280 275 281 276 mutt_canonical_charset (buffer, sizeof (buffer), s); 282 return ! mutt_strcasecmp (buffer, chs);277 return !ascii_strcasecmp (buffer, chs); 283 278 } 284 279
