New environment variable PYTHONIOENCODING.
diff --git a/Doc/c-api/file.rst b/Doc/c-api/file.rst
index e107268..aa753e5 100644
--- a/Doc/c-api/file.rst
+++ b/Doc/c-api/file.rst
@@ -130,6 +130,14 @@
.. versionadded:: 2.3
+.. cfunction:: int PyFile_SetEncodingAndErrors(PyFileObject *p, const char *enc, *errors)
+
+ Set the file's encoding for Unicode output to *enc*, and its error
+ mode to *err*. Return 1 on success and 0 on failure.
+
+ .. versionadded:: 2.6
+
+
.. cfunction:: int PyFile_SoftSpace(PyObject *p, int newflag)
.. index:: single: softspace (file attribute)
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index c6679fd..c96ef10 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -2165,6 +2165,13 @@
.. versionadded:: 2.3
+.. attribute:: file.errors
+
+ The Unicode error handler used to along with the encoding.
+
+ .. versionadded:: 2.6
+
+
.. attribute:: file.mode
The I/O mode for the file. If the file was created using the :func:`open`
diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst
index a6ab7ad..7d9ecad 100644
--- a/Doc/using/cmdline.rst
+++ b/Doc/using/cmdline.rst
@@ -481,6 +481,13 @@
.. versionadded:: 2.6
+.. envvar:: PYTHONIOENCODING
+
+ Overrides the encoding used for stdin/stdout/stderr, in the syntax
+ encodingname:errorhandler, with the :errors part being optional.
+
+ .. versionadded:: 2.6
+
.. envvar:: PYTHONNOUSERSITE