PEP 540: don't mention locale.getpreferredencoding
Replace locale.getpreferredencoding() with "locale encoding" to avoid confusion.
This commit is contained in:
parent
2f1e693eaa
commit
0966f373b6
|
@ -134,7 +134,7 @@ On FreeBSD and Solaris, ``nl_langinfo(CODESET)`` announces an alias of
|
|||
the ASCII encoding, whereas ``mbstowcs()`` and ``wcstombs()`` functions
|
||||
use the ISO 8859-1 encoding (Latin1) in practice. The problem is that
|
||||
``os.fsencode()`` and ``os.fsdecode()`` use
|
||||
``locale.getpreferredencoding()`` codec. For example, if command line
|
||||
Python codec of the locale encoding. For example, if command line
|
||||
arguments are decoded by ``mbstowcs()`` and encoded back by
|
||||
``os.fsencode()``, an ``UnicodeEncodeError`` exception is raised instead
|
||||
of retrieving the original byte string.
|
||||
|
|
Loading…
Reference in New Issue