Print Unicode characters in C, using ncurses
问题 I have to draw a box in C, using ncurses; First, I have defined some values for simplicity: #define RB "\e(0\x6a\e(B" (ASCII 188,Right bottom, for example) I have compiled with gcc, over Ubuntu, with -finput-charset=UTF-8 flag. But, if I try to print with addstr or printw, I get the hexa code. What I`m doing wrong? 回答1: ncurses defines the values ACS_HLINE , ACS_VLINE , ACS_ULCORNER , ACS_URCORNER , ACS_LLCORNER and ACS_LRCORNER . You can use those constants in addch and friends, which should