]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.15] gh-153864: Fix curses window.insch() for non-ASCII characters on a wide build...
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 19 Jul 2026 12:45:26 +0000 (15:45 +0300)
committerGitHub <noreply@github.com>
Sun, 19 Jul 2026 12:45:26 +0000 (12:45 +0000)
commit46d7aa9fbd2fafb099da6a61f3865620d4dc9125
tree974614d38d8e962f6fd7b29345c905bfb2ca6a7c
parent114aa8c402bd9289c8bd5b59137b14cf2f5dc64b
[3.15] gh-153864: Fix curses window.insch() for non-ASCII characters on a wide build (GH-153865) (GH-154117)

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

(cherry picked from commit 223cbffca6df7e4c8c77b360a4e6ba0472255643)

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