Is the Python binding for ncurses unicode capable?
"Martin v. Löwis"
martin at v.loewis.de
Thu Jan 19 00:25:30 EST 2006
bmcnally at gmail.com wrote:
> I can't tell from the documentation, but I'd like to try and print
> unicode characters through Python's binding to ncurses. From reading
> the documentation on the curses module, it doesn't appear that this is
> possible:
>
> http://python.org/doc/2.4.2/lib/module-curses.html
>
> Am I missing something, or is the binding only capable of ASCII?
Neither, nor. There isn't any ncurses API for Unicode - just API
for "wide characters" (wchar_t); Python doesn't use this API.
That doesn't mean it's restricted to ASCII. If your terminal
supports UTF-8, you can output UTF-8 just fine to it, using
Python. Just encode the Unicode strings as UTF-8.
Regards,
Martin
More information about the Python-list
mailing list