Adding Unicode/UTF8 chars to a ncurses display in C

前端 未结 4 369
無奈伤痛
無奈伤痛 2020-12-06 11:09

I\'m attempting to add wchar_t Unicode characters to an ncurses display in C.

I have an array:

wchar_t characters[]={L\'\\uE030\', L\'\\uE029\'}; //          


        
4条回答
  •  一整个雨季
    2020-12-06 11:56

    The wide character support is handled by ncursesw. Depending on your distro, ncurses may or may not point there (seemingly not in yours).

    Try using -lncursesw instead of -lncurses.

    Also, for the locale, try calling setlocale(LC_ALL, "")

提交回复
热议问题