Skip to content

locale.setlocale() crashes on Windows for long locale name #137273

Description

@serhiy-storchaka

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 'English_United States.1252') are pretty long.

Tested and reproduced in 3.12, 3.13, 3.14, and main, on Windows 10.

Linked PRs

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

3.13only security fixes3.14bugs and security fixes3.15pre-release feature fixes, bugs and security fixesOS-windowsextension-modulesC modules in the Modules dirtype-crashA hard crash of the interpreter, possibly with a core dump

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions