Title: Extend curses tests to cover non-ASCII characters under 8-bit locales · Issue #152415 · python/cpython · GitHub
Open Graph Title: Extend curses tests to cover non-ASCII characters under 8-bit locales · Issue #152415 · python/cpython
X Title: Extend curses tests to cover non-ASCII characters under 8-bit locales · Issue #152415 · python/cpython
Description: The non-ASCII tests in test_curses only exercise whatever the test runner's locale can encode, which in practice is UTF-8. As a result the byte-oriented (8-bit locale) code paths of the curses module are barely tested, and several text-a...
Open Graph Description: The non-ASCII tests in test_curses only exercise whatever the test runner's locale can encode, which in practice is UTF-8. As a result the byte-oriented (8-bit locale) code paths of the curses modu...
X Description: The non-ASCII tests in test_curses only exercise whatever the test runner's locale can encode, which in practice is UTF-8. As a result the byte-oriented (8-bit locale) code paths of the curses ...
Opengraph URL: https://github.com/python/cpython/issues/152415
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Extend curses tests to cover non-ASCII characters under 8-bit locales","articleBody":"The non-ASCII tests in `test_curses` only exercise whatever the test runner's locale can encode, which in practice is UTF-8. As a result the byte-oriented (8-bit locale) code paths of the curses module are barely tested, and several text-accepting methods are tested only with ASCII.\n\nThis proposes extending the existing character and string I/O tests with cases for 8-bit encodings, each guarded by the existing encodability check so a case is skipped when the current locale cannot represent it. The cases cover ASCII, a character common to the Latin encodings (`é`), and characters distinctive to a single encoding (byte 0xA4 is `¤` in ISO-8859-1, `€` in ISO-8859-15, `є` in KOI8-U). Running the whole suite under different locales (e.g. `LANG=en_US.ISO8859-1`, `en_US.ISO8859-15`, `uk_UA.koi8u`) then covers those encodings.\n\nIt also fills read-side and other coverage gaps found by an audit of the text-accepting API: `inch`/`instr`, `get_wstr` (previously untested), `getbkgd`/`getbkgrnd`, `unctrl`, the default `border()`/`box()` ACS cells, and characters given as `chtype` ints > 127.\n\nThis is test-only; there is no behaviour change.\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-152416\n* gh-152453\n* gh-152456\n* gh-152457\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/serhiy-storchaka","@type":"Person","name":"serhiy-storchaka"},"datePublished":"2026-06-27T13:37:22Z","url":"https://github.com/python/cpython/issues/152415"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ee98b90b-130b-dc70-f273-a8e3499e7c5f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A8C8:21AC3F:4CF1750:6130B25:6B023AA1 |
| html-safe-nonce | 252c062462b33be239a6301cd97c34cf56db09e760202cd0cfbb26df9fbdc1f4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOEM4OjIxQUMzRjo0Q0YxNzUwOjYxMzBCMjU6NkIwMjNBQTEiLCJ2aXNpdG9yX2lkIjoiODM1NTc3NTQxMjA2Mzg0NTAyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f38a0176306bc8c13adc83a924d6703f3bb13aaf07e3e75b2e117f463e34841a |
| hovercard-subject-tag | issue:4758515124 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/152415/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5220f457df59092027ac1644040e7f1a3ffe7aa702ee25d432b4ad28fca13f12/python/cpython/issues/152415 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5220f457df59092027ac1644040e7f1a3ffe7aa702ee25d432b4ad28fca13f12/python/cpython/issues/152415 |
| og:image:alt | The non-ASCII tests in test_curses only exercise whatever the test runner's locale can encode, which in practice is UTF-8. As a result the byte-oriented (8-bit locale) code paths of the curses modu... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | serhiy-storchaka |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width