I have a program written in C using ncurses. It let user input and display it. It does not display correctly if user input utf8 chars.
I saved the chars user inputed
#need these as well on top of installation and locate setting
#at least check locale
locale
locale-gen en_US.UTF-8
#vim ~/.bashrc # add 3 lines once ok and fix the profile
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export NCURSES_NO_UTF8_ACS=1
You need to have called setlocale(LC_CTYPE, "");
(with a UTF-8 based locale configured) before initializing ncurses. You also need to make sure your ncurses is actually built with wide char support ("ncursesw") but on modern distros this is the default/only build.