| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15. |
Sorry, something went wrong.
|
GH-152467 is a backport of this pull request to the 3.15 branch. |
Sorry, something went wrong.
|
GH-152468 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
|
GH-152469 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
…box (GH-152451) (GH-152468) 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>
…box (GH-152451) (GH-152469) 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>
…box (GH-152451) (GH-152467) 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>
| Back | FazBrowse Home | New Git URL |
curses.textpad.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.
It now decodes cells and input bytes with the window's encoding. 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.
A follow-up will add full Unicode (wide-character) support on top of this.