Title: locale.setlocale() crashes on Windows for long locale name · Issue #137273 · python/cpython · GitHub
Open Graph Title: locale.setlocale() crashes on Windows for long locale name · Issue #137273 · python/cpython
X Title: locale.setlocale() crashes on Windows for long locale name · Issue #137273 · python/cpython
Description: Crash report locale.setlocale(locale.LC_CTYPE, 'ks_IN.UTF-8@devanagari') crashes. locale.setlocale(locale.LC_CTYPE, 'ks_IN.UTF8@devanagari') just raises a locale.Error. It's not just about length. Standard locale names in Windows (like '...
Open Graph Description: Crash report locale.setlocale(locale.LC_CTYPE, 'ks_IN.UTF-8@devanagari') crashes. locale.setlocale(locale.LC_CTYPE, 'ks_IN.UTF8@devanagari') just raises a locale.Error. It's not just about length. ...
X Description: Crash report locale.setlocale(locale.LC_CTYPE, 'ks_IN.UTF-8@devanagari') crashes. locale.setlocale(locale.LC_CTYPE, 'ks_IN.UTF8@devanagari') just raises a locale.Error. It's not...
Opengraph URL: https://github.com/python/cpython/issues/137273
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"locale.setlocale() crashes on Windows for long locale name","articleBody":"# Crash report\n\n`locale.setlocale(locale.LC_CTYPE, 'ks_IN.UTF-8@devanagari')` crashes.\n`locale.setlocale(locale.LC_CTYPE, 'ks_IN.UTF8@devanagari')` just raises a locale.Error.\n\nIt's not just about length. Standard locale names in Windows (like 'English_United States.1252') are pretty long.\n\nTested and reproduced in 3.12, 3.13, 3.14, and main, on Windows 10.\n\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-137300\n* gh-137305\n* gh-137306\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/serhiy-storchaka","@type":"Person","name":"serhiy-storchaka"},"datePublished":"2025-07-31T11:08:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/137273/cpython/issues/137273"}
| 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:339f2149-8320-eeb1-a81b-95f93beb2085 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 804C:32604D:B262F5:F3B097:6A520C30 |
| html-safe-nonce | b7e36f524df36e354fea6d7a3c4fb4277286fb1d82909fae75d0653852088694 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDRDOjMyNjA0RDpCMjYyRjU6RjNCMDk3OjZBNTIwQzMwIiwidmlzaXRvcl9pZCI6IjQ2NDQ1Nzc3NjAyMzIyMTM1NTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d81f358f46ce32c8ff6f1b67725084ba325b55cc1b37f7756f517362a8092cbd |
| hovercard-subject-tag | issue:3280042377 |
| 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/137273/issue_layout |
| twitter:image | https://opengraph.githubassets.com/81f99066e1e8ade54de63121c69382c10e46963e8fd612e589ace6759c483c5f/python/cpython/issues/137273 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/81f99066e1e8ade54de63121c69382c10e46963e8fd612e589ace6759c483c5f/python/cpython/issues/137273 |
| og:image:alt | Crash report locale.setlocale(locale.LC_CTYPE, 'ks_IN.UTF-8@devanagari') crashes. locale.setlocale(locale.LC_CTYPE, 'ks_IN.UTF8@devanagari') just raises a locale.Error. It's not just about length. ... |
| 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 | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width