Message415867
sys.getlocaleencoding() versus locale.getencoding().
For me, the Python locale module should use the C API to access the Unix locales like LC_CTYPE, nl_langinfo(CODESET), etc.
The sys module are more for things specific to Python, like sys.getfilesystemencoding().
Since sys.getlocaleencoding() would be a fixed value for the whole process life time, I agree that the sys module is a better place.
I can write a PR adding sys.getlocaleencoding() if we agree on the API. |
|
Date |
User |
Action |
Args |
2022-03-23 12:15:58 | vstinner | set | recipients:
+ vstinner, lemburg, ezio.melotti, methane |
2022-03-23 12:15:58 | vstinner | set | messageid: <1648037758.12.0.294305161177.issue47000@roundup.psfhosted.org> |
2022-03-23 12:15:58 | vstinner | link | issue47000 messages |
2022-03-23 12:15:58 | vstinner | create | |
|