Victor Stinner writes: > > If this is needed, it should be spelled "os.getlocaleencoding()" (or > > "sys.getlocaleencoding()"?) > > There is already a locale.getpreferredencoding(False) function which > give your the current locale encoding. The problem is that the current > locale encoding may change and so you have to get the new value each > time than you would like to encode or decode data. How can that happen if the programmer (or a module she has imported) isn't messing with the locale? If the programmer is messing with the locale, really they need to be careful. A magic codec whose encoding changes *within* a process is an accident waiting to happen. Do you have a real use case for the "'locale' codec's encoding changes with the locale within process" feature?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4