summaryrefslogtreecommitdiffstats
path: root/Doc/library/sys.rst
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2008-10-03 16:09:28 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2008-10-03 16:09:28 (GMT)
commit04dc25c53728f5c2fe66d9e66af67da0c9b8959d (patch)
tree89a6a5bfc7567d3f5deba78bd96fedd2e167e2ce /Doc/library/sys.rst
parentefb14a8857c57e446477ecb964b301b041527c50 (diff)
downloadcpython-04dc25c53728f5c2fe66d9e66af67da0c9b8959d.zip
cpython-04dc25c53728f5c2fe66d9e66af67da0c9b8959d.tar.gz
cpython-04dc25c53728f5c2fe66d9e66af67da0c9b8959d.tar.bz2
Issue #3187: Add sys.setfilesystemencoding.
Diffstat (limited to 'Doc/library/sys.rst')
-rw-r--r--Doc/library/sys.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst
index 47217f4..568b06d 100644
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -578,6 +578,14 @@ always available.
:file:`/usr/include/dlfcn.h` using the :program:`h2py` script. Availability:
Unix.
+.. function:: setfilesystemencoding(enc)
+
+ Set the encoding used when converting Python strings to file names to *enc*.
+ By default, Python tries to determine the encoding it should use automatically
+ on Unix; on Windows, it avoids such conversion completely. This function can
+ be used when Python's determination of the encoding needs to be overwritten,
+ e.g. when not all file names on disk can be decoded using the encoding that
+ Python had chosen.
.. function:: setprofile(profilefunc)