[issue18118] curses utf8 output broken in Python2

helmut report at bugs.python.org
Mon Jun 3 08:03:34 CEST 2013


helmut added the comment:

> I suppose that screen.addstr(0, 0, u"äöü".encode("utf-8")) works.

It works as in "the output looks as the one expected". Long lines with utf8 characters will make it break again though.

screen.addstr(0, 0, "äöü" * 20) # assuming COLUMNS=80

Will give two rows of characters of which the first row is 40 characters long.

> 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.

Sounds sensible. Are you aware of a workaround for this issue? I.e. is there any way to force Python2.7 to use the wide mode for outputting characters?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18118>
_______________________________________


More information about the Python-bugs-list mailing list