Document that the 'strict' error handler is used to encode/decode filenames on

Windows
This commit is contained in:
Victor Stinner 2010-10-09 10:34:37 +00:00
parent 257d38ffdd
commit 62165d67a2
2 changed files with 18 additions and 15 deletions

View file

@ -158,9 +158,7 @@ process and user.
.. function:: fsencode(filename)
Encode *filename* to the filesystem encoding with ``'surrogateescape'``
error handler, return :class:`bytes` unchanged. On Windows, use ``'strict'``
error handler if the filesystem encoding is ``'mbcs'`` (which is the default
encoding).
error handler, or ``'strict'`` on Windows; return :class:`bytes` unchanged.
:func:`fsdecode` is the reverse function.
@ -170,9 +168,7 @@ process and user.
.. function:: fsdecode(filename)
Decode *filename* from the filesystem encoding with ``'surrogateescape'``
error handler, return :class:`str` unchanged. On Windows, use ``'strict'``
error handler if the filesystem encoding is ``'mbcs'`` (which is the default
encoding).
error handler, or ``'strict'`` on Windows; return :class:`str` unchanged.
:func:`fsencode` is the reverse function.