Re: curses inch()/mvinch() mangle non-ASCII characters of an 8-bit locale on a wide build

Serhiy Storchaka <[email protected]> Mon, 29 Jun 2026 09:55:23 +0300
Newsgroups gmane.comp.lib.ncurses.bugs
Message-ID <[email protected]>
28.06.26 00:12, Thomas Dickey:
> On Sat, Jun 27, 2026 at 07:42:50PM +0300, Serhiy Storchaka wrote:
>> On a wide build (linked against ncursesw), window.inch() and window.mvinch()
>> return a wrong value for a non-ASCII character that is representable in the
> ...
>> Only inch()/mvinch() are affected. inchstr()/inchnstr() are not exposed by
>> the module, and getbkgd() already round-trips. The write side needs no
>> change: ncurses stores each cell as a wchar_t on a wide build, so the
>> asymmetry is purely on readback. UTF-8 locales remain unsupported for
>> inch().
> thanks (I assume "module" in this comment refers to python)
>
Yes. Sorry, that slipped through because the bugs were found during the 
development of the Python module. But they also appear in pure C.