summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-08-18 21:23:25 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-08-18 21:23:25 (GMT)
commit94908bbc1503df830d1d615e7b57744ae1b41079 (patch)
tree21569de8c7a5018cd83c3692c06544ba77de6f6c /Doc
parent56ab01b66aaee7495615beecd90438fe9ed99615 (diff)
downloadcpython-94908bbc1503df830d1d615e7b57744ae1b41079.zip
cpython-94908bbc1503df830d1d615e7b57744ae1b41079.tar.gz
cpython-94908bbc1503df830d1d615e7b57744ae1b41079.tar.bz2
Issue #8622: Add PYTHONFSENCODING environment variable to override the
filesystem encoding. initfsencoding() displays also a better error message if get_codeset() failed.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/using/cmdline.rst15
-rw-r--r--Doc/whatsnew/3.2.rst9
2 files changed, 21 insertions, 3 deletions
diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst
index 81d118b..c1130e4 100644
--- a/Doc/using/cmdline.rst
+++ b/Doc/using/cmdline.rst
@@ -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'``.
diff --git a/Doc/whatsnew/3.2.rst b/Doc/whatsnew/3.2.rst
index a2b7af4..1799b70 100644
--- a/Doc/whatsnew/3.2.rst
+++ b/Doc/whatsnew/3.2.rst
@@ -232,6 +232,15 @@ Major performance enhancements have been added:
* Stub
+
+Unicode
+=======
+
+The filesystem encoding can be specified by setting the
+:envvar:`PYTHONFSENCODING` environment variable before running the intepreter.
+The value should be a string in the form ``<encoding>``, e.g. ``utf-8``.
+
+
IDLE
====