SDL wide char support. ncursesw support

Breaking news:
On linux Cataclysm linked with ncursesw(wide char) but it’s headers have never! included.
This can be seen in cursesdef.h +10:

This string assumes that compiler was launched with included ncursesw headers ncursesw5-config --cflags (-I/usr/include/ncursesw). In Makefile this is not happening. So ncursesw now works with ncurses on Linux(why link?) rather ncursesw. This can be fixed easily.

Bug/Problem:
I have made fix of Issue #6008 in my local branch. It’s working. Almost full support of Unicode. It was my second try. Fix based on nucursesw function add_wch(… cchar_t *). cchar_t is defined in ncursesw/curses.h:

typedef struct { attr_t attr; wchar_t chars[CCHARW_MAX]; }cchar_t;
This function simply prints Unicode char on terminal. There is one more possible way to fix issue #6008. This is very very WRONG way. It’s possible to use slice of C sring with utf_8 sequence to represent single Unicode character and print this slice with mvwprintz().
Lots of problems are appearing during setting TILES=1.
Ncurses Headers aren’t included during compilation with SDL. As I understood all Ncursers functions is emulated in Cataclysm code(cursesport.cpp). Please, confirm this. If it’s true, do I need realize add_wch() by myself?

Furthermore.
It’s a problem with Ncurses on MAC OSX. On default, on MAC OSX Cataclysm is compiling with Ncurses support. But not with ncursesw support. Is ncursesw exist on MAC OSX? Any problem with native compilation?

Any problems with ncursesw on CYGWIN?

This problems block resolving of Issue #6008

We’ve got a project to migrate to SDL2 in the works, should land after 0.A. Any thoughts on whether that’ll help?

If I recall correctly, OSX only has ncurses.so, but it’s actually the wide version under the hood.
On my system “ncursesw5-config --cflags” outputs “”, so I’m not sure what needs to be done about that.
I THINK waddch(), which is in catacurses does what you need, we just need better handling throughout the codebase.

Yeah OSX combined both versions into a single library a long time back, if you for some reason need to specifically call the wide version all you do is point it at the same library and it handles it IIRC.