[issue6745] (curses) addstr() takes str in Python 3
STINNER Victor
report at bugs.python.org
Fri Aug 28 00:31:56 CEST 2009
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
First, make sure that your Python3 build uses libncursesw and not
libncurses, because libncursesw supports unicode, whereas libncurses
doesn't... On UNIX, use the following command to check this:
ldd $(./python -c "import _curses; print(_curses.__file__)")|grep curses
> Note that the output here always seems to be utf-8,
> which is plain wrong.
Yes, addstr() always uses utf8 to convert unicode to bytes. It's wrong
if the terminal uses a different charset. But I'm not sure that using
bytes is a better idea: since you would like to print characters,
unicode is the right type.
An idea would be to use a configurable charset. Eg. add a 'charset'
attribute to a window (or to the module).
----------
nosy: +haypo
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6745>
_______________________________________
More information about the Python-bugs-list
mailing list