[issue18118] curses utf8 output broken in Python2
STINNER Victor
report at bugs.python.org
Sun Jun 2 22:45:42 CEST 2013
STINNER Victor added the comment:
u"äöü" encoded to "utf-8" gives '\xc3\xa4\xc3\xb6\xc3\xbc'
"\303\303\303\274" is '\xc3\xc3\xc3\xbc'.
I guess that curses considers that '\xc3\xa4' is a string of 2 characters: screen.addstr(0, 1, "ö") replaces the second "character", '\xa4'.
I suppose that screen.addstr(0, 0, u"äöü".encode("utf-8")) works.
If "_cursessomething.so" is already linked against libncursesw.so.5, the fix is to use waddwstr(), but such change cannot be done in a minor release like Python 2.7.6. So I'm closing this issue as wont fix => you have to move to Python 3.3.
----------
resolution: -> wont fix
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18118>
_______________________________________
More information about the Python-bugs-list
mailing list