diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/recode.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core/recode.c b/src/core/recode.c index 48f2811e..70768645 100644 --- a/src/core/recode.c +++ b/src/core/recode.c @@ -134,12 +134,13 @@ char *recode_in(const SERVER_REC *server, const char *str, const char *target) recoded = g_convert_with_fallback(str, len, to, from, NULL, NULL, NULL, NULL); if (!recoded) { - if (term_is_utf8) { - if (!str_is_utf8) - from = settings_get_str("recode_fallback"); - - } else if (str_is_utf8) - from = "UTF-8"; + if (str_is_utf8) + if (term_is_utf8) + return g_strdup(str); + else + from = "UTF-8"; + else + from = settings_get_str("recode_fallback"); if (from) recoded = g_convert_with_fallback(str, len, to, from, NULL, NULL, NULL, NULL); |