This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients eryksun, lemburg, methane, vstinner
Date 2021-03-19.12:25:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> If Python calls setlocale() per default now, it has served its purpose.

Except not for embedding applications if configure_locale [1] isn't set. But in that case determining the default locale isn't Python's problem to solve.

> My assumption is that nl_langinfo(CODESET) does not work on Windows
> or gives wrong results. Is that incorrect ?

There is no such function for CRT locales. I provided two alternatives that would allow implementing this consistent with POSIX, and thus avoid all of the "except on Windows..." disclaimers that have to explain (apologize) that only the process ANSI code page is used in Windows, and, for no good reason as far as I can tell, the LC_CTYPE locale encoding is completely ignored.


Date User Action Args
2021-03-19 12:25:03eryksunsetrecipients: + eryksun, lemburg, vstinner, methane
2021-03-19 12:25:03eryksunsetmessageid: <>
2021-03-19 12:25:03eryksunlinkissue43552 messages
2021-03-19 12:25:02eryksuncreate