[w3m-dev 04240] nl_langinfo() requires setlocale()

This commit is contained in:
Dai Sato
2007-05-23 12:34:20 +00:00
parent 599bb41857
commit e4305ca608
6 changed files with 24 additions and 13 deletions

View File

@@ -376,7 +376,8 @@ wc_locale_to_ces(char *locale)
#ifdef HAVE_LANGINFO_CODESET
{
char *cs = nl_langinfo(CODESET);
return wc_charset_to_ces(cs);
if (cs && strcmp(cs, "US-ASCII"))
return wc_charset_to_ces(cs);
}
#endif
for (n = 0; *p && *p != '.' && n < 5; p++) {