Is the Python binding for ncurses unicode capable?
bmcnally at gmail.com
bmcnally at gmail.com
Fri Jan 20 18:10:34 EST 2006
Can someone explain what I'm doing wrong? The following code snipet
produces an error about addch() expecting an int:
u = u'\u2591'
s = u.encode("UTF-8")
stdscr.addch((y+1), (x+1), s, curses.color_pair(1))
If I try this instead:
u = u'\u2591'
s = u.encode("UTF-8")
stdscr.addstr((y+1), (x+1), s, curses.color_pair(1))
I don't get what I expect to print out on the screen.
I don't have any problems with simply printing the characters from
Python (outside of ncurses), but using the ncurses functions for
printing these characters is problematic.
More information about the Python-list
mailing list