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 vstinner
Recipients eryksun, lemburg, serhiy.storchaka, vstinner
Date 2022-02-08.10:20:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Serhiy: "getdefaultlocale() falls back to LANG and LANGUAGE. It allows also to specify a list of looked up environment variables. How could this use case be covered with getlocale()?"

What's your use case to use env vars rather than the current LC_CTYPE locale?

My concern is that when setlocale() is called, the current LC_CTYPE locale is inconsistent and you can get mojibake and others issues.

See for example:

Marc-Andre Lemburg wants to deprecate it:
Date User Action Args
2022-02-08 10:20:19vstinnersetrecipients: + vstinner, lemburg, serhiy.storchaka, eryksun
2022-02-08 10:20:19vstinnersetmessageid: <>
2022-02-08 10:20:19vstinnerlinkissue46659 messages
2022-02-08 10:20:19vstinnercreate