mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Issue #8622: Add PYTHONFSENCODING environment variable to override the
filesystem encoding. initfsencoding() displays also a better error message if get_codeset() failed.
This commit is contained in:
parent
56ab01b66a
commit
94908bbc15
7 changed files with 93 additions and 34 deletions
|
|
@ -442,11 +442,20 @@ These environment variables influence Python's behavior.
|
|||
import of source modules.
|
||||
|
||||
|
||||
.. envvar:: PYTHONFSENCODING
|
||||
|
||||
If this is set before running the intepreter, it overrides the encoding used
|
||||
for the filesystem encoding (see :func:`sys.getfilesystemencoding`).
|
||||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
|
||||
.. envvar:: PYTHONIOENCODING
|
||||
|
||||
Overrides the encoding used for stdin/stdout/stderr, in the syntax
|
||||
``encodingname:errorhandler``. The ``:errorhandler`` part is optional and
|
||||
has the same meaning as in :func:`str.encode`.
|
||||
If this is set before running the intepreter, it overrides the encoding used
|
||||
for stdin/stdout/stderr, in the syntax ``encodingname:errorhandler``. The
|
||||
``:errorhandler`` part is optional and has the same meaning as in
|
||||
:func:`str.encode`.
|
||||
|
||||
For stderr, the ``:errorhandler`` part is ignored; the handler will always be
|
||||
``'backslashreplace'``.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue