Support Unix-like locales on Windows
@serhiy-storchaka ci sta già lavorando.
Dal 20/4/2026.
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 35.9k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
Feature or enhancement
Windows supports locale names in different formats. Some of them look similar to Unix-like names. The locale module tries to convert locale names on Windows to Unix-like form. It does not try hard, so getlocale() and setlocale() can return something unusual. What is worse, Unix-like names are not always supported in setlocale(), even if the locale in principle is supported on Windows. See also #67613 and #87281.
This issue is a continuation of #137729 on Windows. Linux and Unix in general support locales ca_ES.utf8@valencia, sr_RS.utf8@latin and uz_UZ.utf8@cyrillic. Windows supports the same locales with names ca-ES-valencia, sr-Latn-RS and uz-Cyrl-UZ. setlocale() should map the former to the latter (of course it should continue to support the former).
Linked PRs
- gh-148794
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Valutazione
Questa issue non è ancora stata valutata.