Package: libncursesw5,libncursesw5-dev Version: 5.6+20080830-1 Severity: normal
When using multi-bytes UTF-8 characters in libncurses, it wrongly calculates its width, and messes up all the display. Attached is a simple program which demostrates it; the output should be: +--------------+ |Juan Cespedes | |Juan Céspedes | +--------------+ but instead it shows: +--------------+ |Juan Cespedes | |Juan Céspedes| +--------------+ I have tried both libncurses and libncursesw; I have also tried different versions (from 5.5-5 to 5.6+20080830-1), and also different terminal emulators (gnome-terminal, xterm, screen). The results are always the same. Thanks, -- Juan Cespedes
#include <ncursesw/ncurses.h> int main(void) { initscr(); curs_set(0); mvaddch(0, 0, '+'); mvaddch(0, 15, '+'); mvaddch(3, 0, '+'); mvaddch(3, 15, '+'); mvhline(0, 1, '-', 14); mvhline(3, 1, '-', 14); mvvline(1, 0, '|', 2); mvvline(1, 15, '|', 2); mvaddstr(1, 1, "Juan Cespedes"); mvaddstr(2, 1, "Juan Céspedes"); refresh(); getch(); endwin(); return 0; }