diff options
author | Valentin Batz <senneth@irssi.org> | 2004-09-20 12:45:49 +0000 |
---|---|---|
committer | senneth <senneth@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2004-09-20 12:45:49 +0000 |
commit | a26038c6647498077bc75b5bda76913f071dac04 (patch) | |
tree | ba8f3134bc80449e0c27db37a13c98b49640ec6b /src/fe-common/core/fe-recode.c | |
parent | 4cc4ddc1a796aa2e579e61acefc0348022de7e4f (diff) | |
download | irssi-a26038c6647498077bc75b5bda76913f071dac04.zip |
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
Diffstat (limited to 'src/fe-common/core/fe-recode.c')
-rw-r--r-- | src/fe-common/core/fe-recode.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fe-common/core/fe-recode.c b/src/fe-common/core/fe-recode.c index a46e3547..b26a5cbe 100644 --- a/src/fe-common/core/fe-recode.c +++ b/src/fe-common/core/fe-recode.c @@ -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 |