Trying to get full support for UTF8 under ncurses. I built ncurses 5.9 with wide character support. If I have a utf8 string as in:
D0 9D D0 BE D0 B2 D1 8B D0 B9
will output Новый
in the normal console with printf. If I start ncurses and use waddstr
I get only some of the characters as in: ?~]ов?~Kй
. Why is it not working and what significance is the embedded escape sequences ~] and ~K ?
I am including wide version of header and linking with the built wide libraries.
This is built using open watcom (static linked), it turns out OW just always uses "C" locale, so rebuilt the libraries removing HAVE_LOCALE_H
(which allows ncurses to pull in the information from environment variables in this case LANG='en_US.UTF-8'
). So now that gets rid of the ~]
and ~K
but still get ? ов? й
(and now \n
for new lines doesn't work).
So this has morphed in to two additional questions:
1 ) What does ncurses require of the c library? (Apparently ncurses is handling some multi-byte characters just fine, but still problems with those two)
2) Why did the newline
character stop working?
TIA!!