From ce3b2c80a1396725b354d41ce76378d61eed1913 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Sun, 19 May 2013 19:28:08 +0200 Subject: Use a little bit more straight-forward detection --- src/sdtui.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sdtui.c b/src/sdtui.c index 0c03ff5..285cd9c 100644 --- a/src/sdtui.c +++ b/src/sdtui.c @@ -101,8 +101,8 @@ struct curses_event static gboolean is_character_in_locale (wchar_t c) { - cchar_t cch; - return setcchar (&cch, &c, A_NORMAL, 0, NULL) != ERR; + wchar_t s[] = { c, 0 }; + return wcstombs (NULL, s, 0) != (size_t) -1; } /** Translate key codes above KEY_MAX returned from ncurses into something -- cgit v1.2.3-70-g09d2