In default_charset(): if nl_langinfo() gives us "646", return "ascii".

This commit is contained in:
Wayne Davison
2006-02-05 07:20:10 +00:00
parent 1f77038ef2
commit 0be05d6038

View File

@@ -58,7 +58,10 @@ static char *default_charset(void)
#if defined HAVE_LIBCHARSET_H && defined HAVE_LOCALE_CHARSET
return locale_charset();
#elif defined HAVE_LANGINFO_H && defined HAVE_NL_LANGINFO
return nl_langinfo(CODESET);
char *def = nl_langinfo(CODESET);
if (strcmp(def, "646") == 0) /* Solaris brain-damage */
return "ascii";
return def;
#else
return ""; /* Works with (at the very least) gnu iconv... */
#endif