| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Back complexchar, complexstr and the cell read methods (in_wch, in_wchstr, in_wstr, getbkgrnd) with a chtype instead of a cchar_t when ncursesw is absent, so the same code works on both builds. A narrow build is limited to one character per cell, encodable as a single byte in the window's encoding (8-bit locales), with the color pair limited to the color_pair() range. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Documentation build overview3 files changed ± library/curses.html ± whatsnew/3.16.html ± whatsnew/changelog.html |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Make complexchar, complexstr and the cell read methods in_wch, in_wchstr, in_wstr and getbkgrnd work whether or not Python was built against a wide-character (ncursesw) library, so the same code runs on both builds.
When ncursesw is absent a cell is backed by a chtype instead of a cchar_t: it holds a single character, encodable as one byte in the window's encoding (so only 8-bit locales are supported), with the color pair limited to the color_pair() range. get_wch, get_wstr, erasewchar, killwchar and wunctrl stay wide-only (they have no narrow counterpart with the same return type).
Tested on both a wide (-lncursesw) and a narrow (-lncurses) build of test_curses under en_US.UTF-8, en_US.ISO-8859-15 and uk_UA.KOI8-U.