Changed the order of recode_out_default_charset, it doesn't override /recode add anymore. The string returned by nl_langinfo(CODESET) may be empty, use ISO8859-1 in this case

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3306 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Valentin Batz 2004-09-20 12:45:49 +00:00 committed by senneth
commit a26038c664
4 changed files with 20 additions and 16 deletions

View file

@ -165,7 +165,9 @@ static void read_settings(void)
term_charset = settings_get_str("term_charset");
if (!is_valid_charset(term_charset)) {
#if defined (HAVE_NL_LANGINFO) && defined(CODESET)
settings_set_str("term_charset", is_valid_charset(old_term_charset) ? old_term_charset : nl_langinfo(CODESET));
settings_set_str("term_charset", is_valid_charset(old_term_charset) ?
old_term_charset : *nl_langinfo(CODESET) != '\0' ?
nl_langinfo(CODESET) : "ISO8859-1");
#else
settings_set_str("term_charset", is_valid_charset(old_term_charset) ? old_term_charset : "ISO8859-1");
#endif