STINNER Victor added the comment:

To debug this issue, it would help to have the following information:
 - locale encoding: encoding variable
 - tested character: ch
 - character read by ncurses: read

Can someone reproducing the issue try to add: print("encoding=%s, ch=%r, 
read=%r" % (encoding, ch, read)) before the error?

It may be an issue in the Python implementation of unget_wch() or get_wch().

--

> I believe the problem is due to a sign-extension bug in the ncurses library 
> unget_wch function (see link below).

Can we workaround this issue in Python? For example, use value & 0xffffff?

--

The test should be modified to use the encoding of stdscr, not the locale 
encoding: encoding = stdscr.encoding. (In this test, both encodings should be 
the same.)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15037>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to