]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-153864: Fix curses window.insch() for non-ASCII characters on a wide build (GH...
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 19 Jul 2026 08:45:06 +0000 (11:45 +0300)
committerGitHub <noreply@github.com>
Sun, 19 Jul 2026 08:45:06 +0000 (08:45 +0000)
commit223cbffca6df7e4c8c77b360a4e6ba0472255643
treea9c695ae26cf32b46a7fefe746a287d210d5a0a0
parent9f5af278960a2f73a2e070de5141701e72675cf6
gh-153864: Fix curses window.insch() for non-ASCII characters on a wide build (GH-153865)

On a wide build, winsch() does not locale-decode a byte above 127, unlike
waddch(), so insch() inserted '¤' (U+00A4) instead of '€' for byte 0xA4
under ISO-8859-15.  Decode the byte with btowc() and insert it as a wide
character, like addch().

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Lib/test/test_curses.py
Misc/NEWS.d/next/Library/2026-07-17-20-56-32.gh-issue-153864.WmA9By.rst [new file with mode: 0644]
Modules/_cursesmodule.c