Ncurses - two characters

Hi guys,

I have little bit problems with ncurses. Recently I have to solve problem with non-asci characters and it was really horible.

I found many articles - like this http://roguebasin.roguelikedevelopment.org/index.php/Ncursesw and I managed to this changes.

a) setlocale(LC_ALL, "");
b) remove -lncurses and add -lncursesw
c) replace include with include <ncursesw/curses.h>

So now i get correctly showing nonasci character but when I press non-asci character like (č,ř,ě,š) I get two from function getch() two code! Another character are normal. This two code is - first normal UTF-8 code for (č) but another code is UTF-8 code for big (Č).

If you could give me any help how solve this, I would be really grateful.

Oh yes, and I use Ubuntu 12.04 and ncurses version 5.9.20110404

Thanks

getch() gets a char, which represents ASCII range for UTF characters you need to use wchar_t. This is a wide or two bytes character and can hold all characters.

look at get_wch from nCurses
Topic archived. No new replies allowed.