diff options
author | Timo Sirainen <cras@irssi.org> | 2005-11-19 18:13:18 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2005-11-19 18:13:18 +0000 |
commit | 342141fcb20cffcc7c2f49e7e478ba81af467df3 (patch) | |
tree | 880ce26a8d730bc26fa11976f05f5d22f6110b91 /src/fe-common | |
parent | 5178a643bb565a987544bdb4d70c344000ecf201 (diff) | |
download | irssi-342141fcb20cffcc7c2f49e7e478ba81af467df3.zip |
If transliterations don't work in the system (eg. Solaris), don't allow
recode_transliterate setting to be enabled.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4082 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common')
-rw-r--r-- | src/fe-common/core/fe-recode.c | 11 | ||||
-rw-r--r-- | src/fe-common/core/module-formats.c | 1 | ||||
-rw-r--r-- | src/fe-common/core/module-formats.h | 1 |
3 files changed, 12 insertions, 1 deletions
diff --git a/src/fe-common/core/fe-recode.c b/src/fe-common/core/fe-recode.c index b6d89e96..988c3762 100644 --- a/src/fe-common/core/fe-recode.c +++ b/src/fe-common/core/fe-recode.c @@ -155,7 +155,16 @@ static void read_settings(void) char *old_term_charset = g_strdup(term_charset); char *old_recode_fallback = g_strdup(recode_fallback); char *old_recode_out_default = g_strdup(recode_out_default); - + + if (settings_get_bool("recode_transliterate")) { + /* check if transliterations are supported in this system */ + if (!is_valid_charset("ASCII")) { + printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, + TXT_CONVERSION_NO_TRANSLITS); + settings_set_bool("recode_transliterate", FALSE); + } + } + if (recode_fallback) g_free(recode_fallback); recode_fallback = g_strdup(settings_get_str("recode_fallback")); diff --git a/src/fe-common/core/module-formats.c b/src/fe-common/core/module-formats.c index 66fb9f91..d9bfc48b 100644 --- a/src/fe-common/core/module-formats.c +++ b/src/fe-common/core/module-formats.c @@ -255,6 +255,7 @@ FORMAT_REC fecommon_core_formats[] = { { "conversion_added", "Added {hilight $0}/{hilight $1} to conversion database", 2, { FORMAT_STRING, FORMAT_STRING } }, { "conversion_removed", "Removed {hilight $0} from conversion database", 1, { FORMAT_STRING } }, { "conversion_not_found", "{hilight $0} not found in conversion database", 1, { FORMAT_STRING } }, + { "conversion_no_translits", "Transliterations not supported in this system", 0 }, { "recode_header", "%#Target Character set", 0 }, { "recode_line", "%#%|$[!30]0 $1", 2, { FORMAT_STRING, FORMAT_STRING } }, diff --git a/src/fe-common/core/module-formats.h b/src/fe-common/core/module-formats.h index 55ea9df0..8f481aca 100644 --- a/src/fe-common/core/module-formats.h +++ b/src/fe-common/core/module-formats.h @@ -221,6 +221,7 @@ enum { TXT_CONVERSION_ADDED, TXT_CONVERSION_REMOVED, TXT_CONVERSION_NOT_FOUND, + TXT_CONVERSION_NO_TRANSLITS, TXT_RECODE_HEADER, TXT_RECODE_LINE, |