From 764f311a8ba7e38f4b0dd4428854a08045389931 Mon Sep 17 00:00:00 2001 From: Emanuele Giaquinta Date: Wed, 14 May 2008 09:11:31 +0000 Subject: [PATCH] Use g_get_charset to check if the locale codeset is UTF-8. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4822 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/term.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/fe-text/term.c b/src/fe-text/term.c index 4d77afb9..38239016 100644 --- a/src/fe-text/term.c +++ b/src/fe-text/term.c @@ -26,10 +26,6 @@ #include "term.h" #include "mainwindows.h" -#ifdef HAVE_NL_LANGINFO -# include -#endif - #ifdef HAVE_SYS_IOCTL_H # include #endif @@ -143,6 +139,7 @@ static void read_settings(void) void term_common_init(void) { + const char *dummy; #ifdef SIGWINCH struct sigaction act; #endif @@ -154,12 +151,10 @@ void term_common_init(void) term_use_colors = term_has_colors() && settings_get_bool("colors"); read_settings(); -#if defined (HAVE_NL_LANGINFO) && defined(CODESET) - if (strcmp(nl_langinfo(CODESET), "UTF-8") == 0) { + if (g_get_charset(&dummy)) { term_type = TERM_TYPE_UTF8; term_set_input_type(TERM_TYPE_UTF8); } -#endif signal_add("beep", (SIGNAL_FUNC) term_beep); signal_add("setup changed", (SIGNAL_FUNC) read_settings);