Issue #3187: Add sys.setfilesystemencoding.
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 @@
    :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)