Original Post
I'm using NCurses for the Unix-like port of a text-based app. I know for a fact that my terminal (xfce4-terminal) supports UTF-8, as I have tested it with printf. Afaik, most other major terminals, such as the ones used by Gnome, KDE, and Mac OS X, support UTF-8 as well. I expected that printing UTF-8 text to NCurses would be pretty straightforward, but I was apparently wrong. In my test program which draws a box with Unicode box drawing chars, the output is junk. Interestingly enough, the junk consisted only of ASCII chars. This is strange because the strings don't contain any ASCII chars at all, with the exception of spaces. It appears that NCurses is discarding the highest bit of each byte. Why would it do this? Is there some kind of function that enables UTF-8 output?
If all else fails, I'll change my console class to print pure ANSI escape sequences, rather than using NCurses. I would have done this in the first place if I had any idea to handle input from non-printable keys like F1-F12, arrows, page up/down, etc.
Has anyone else here had the same problem with NCurses? Any help is appreciated.
If all else fails, I'll change my console class to print pure ANSI escape sequences, rather than using NCurses. I would have done this in the first place if I had any idea to handle input from non-printable keys like F1-F12, arrows, page up/down, etc.
Has anyone else here had the same problem with NCurses? Any help is appreciated.