[New-bugs-announce] [issue18118] curses utf8 output broken

helmut report at bugs.python.org
Sun Jun 2 12:14:02 CEST 2013


New submission from helmut:

Consider the test case below.

<<<
#!/usr/bin/python
# -*- encoding: utf8 -*-

import curses

def wrapped(screen):
    screen.addstr(0, 0, "ä")
    screen.addstr(0, 1, "ö")
    screen.addstr(0, 2, "ü")
    screen.getch()

if __name__ == "__main__":
    curses.wrapper(wrapped)
>>>

Expected output: "äöü"
Output on py3.3: as expected
Output on py2.7.3: "?ü"
The actual bytes (as determined by strace) were "\303\303\303\274". Observe the inclusion of broken utf8 sequences.

This issue was initially discovered on Debian sid, but independently confirmed on Arch Linux and two more unknown.

----------
components: Library (Lib)
messages: 190479
nosy: helmut
priority: normal
severity: normal
status: open
title: curses utf8 output broken
type: behavior
versions: Python 2.7

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


More information about the New-bugs-announce mailing list