FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.14] gh-133031: Support non-ASCII characters in curses.textpad.Textbox (GH-152451) by miss-islington · Pull Request #152468 · python/cpython · GitHub

Repository navigation

[3.14] gh-133031: Support non-ASCII characters in curses.textpad.Textbox (GH-152451) - #152468

Merged
serhiy-storchaka merged 1 commit into
python:3.14from
miss-islington:backport-c253f0c-3.14
Jun 29, 2026
Merged

serhiy-storchaka merged 1 commit into
python:3.14from
miss-islington:backport-c253f0c-3.14

Conversation

miss-islington commented Jun 28, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

Textbox mangled non-ASCII characters of an 8-bit locale encoding: it masked
reads with curses.ascii.ascii(), which clears the 8th bit, and tested input
with curses.ascii.isprint(), which rejects bytes above 127.

Decode cells and input bytes with the window's encoding instead. Cells are
read with instr() and the lower-right cell is written as text, since inch() and
insch() with an int byte mishandle a non-ASCII character on a wide build. This
uses only the byte-oriented curses API, so it works without wide-character
support.
(cherry picked from commit c253f0c)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com
Co-authored-by: Claude Opus 4.8 noreply@anthropic.com

…ox (pythonGH-152451)

Textbox mangled non-ASCII characters of an 8-bit locale encoding: it masked
reads with curses.ascii.ascii(), which clears the 8th bit, and tested input
with curses.ascii.isprint(), which rejects bytes above 127.

Decode cells and input bytes with the window's encoding instead.  Cells are
read with instr() and the lower-right cell is written as text, since inch() and
insch() with an int byte mishandle a non-ASCII character on a wide build.  This
uses only the byte-oriented curses API, so it works without wide-character
support.
(cherry picked from commit c253f0c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
serhiy-storchaka merged commit 527e238 into python:3.14 Jun 29, 2026
49 checks passed
miss-islington deleted the backport-c253f0c-3.14 branch June 29, 2026 11:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL