OSDN Git Service

Alexander E. Patrakov:
authorTakashi Iwai <tiwai@suse.de>
Mon, 16 Feb 2004 16:44:06 +0000 (16:44 +0000)
committerTakashi Iwai <tiwai@suse.de>
Mon, 16 Feb 2004 16:44:06 +0000 (16:44 +0000)
With ncurses 5.4 or later, it is necessary to have the
correct LC_CTYPE setting before calling initscr(). Otherwise, the line
drawing characters and boxes are not visible on Linux console in UTF-8 mode,
and that makes alsamixer totally unusable on such terminal.

alsamixer/alsamixer.c

index 665e172..560d27c 100644 (file)
 #include <sys/signal.h>
 #include <sys/time.h>
 
+#include <locale.h>
+
 #ifndef CURSESINC
 #include <ncurses.h>
 #else
@@ -1580,6 +1582,7 @@ mixer_init_window (void)
 {
   /* initialize ncurses
    */
+  setlocale(LC_CTYPE, "");
   mixer_window = initscr ();
   curs_set (0); /* hide the cursor */