summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-08-06 22:23:56 +0200
committerSebastien Helleu <flashcode@flashtux.org>2011-08-06 22:23:56 +0200
commit625a264a446730e058ceff456c9cf197a2480c7f (patch)
tree271e94eca7e7ecf4b8e808fe1676ff8b28fd517f /src/gui
parent34a9221d8fa387666c0b66c4493168b1bd7ac506 (diff)
downloadweechat-625a264a446730e058ceff456c9cf197a2480c7f.zip
core: display a warning at startup if locale is UTF-8 and if ncurses has no wide-char/UTF-8 support
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/curses/gui-curses-main.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/gui/curses/gui-curses-main.c b/src/gui/curses/gui-curses-main.c
index b95961fc3..f7c2f11b5 100644
--- a/src/gui/curses/gui-curses-main.c
+++ b/src/gui/curses/gui-curses-main.c
@@ -167,6 +167,27 @@ gui_main_init ()
gui_bar_window_calculate_pos_size (ptr_bar_win, gui_windows);
gui_bar_window_create_win (ptr_bar_win);
}
+
+ /*
+ * display a warning if locale is UTF-8 and if ncurses has no
+ * wide-char/UTF-8 support
+ */
+#ifndef NCURSES_WACS
+ if (local_utf8)
+ {
+ gui_chat_printf (NULL,
+ "***************************************************************");
+ gui_chat_printf (NULL,
+ "%sWARNING: the locale is UTF-8 but ncurses "
+ "has no wide-char/UTF-8 support: either install "
+ "libncursesw and compile WeeChat with it or "
+ "check that ncurses was compiled with option "
+ "\"--enable-widec\"",
+ gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
+ gui_chat_printf (NULL,
+ "***************************************************************");
+ }
+#endif
}
if (CONFIG_BOOLEAN(config_look_mouse))