[issue43395] os.path states that bytes can't represent all MBCS paths under Windows

Eric L. report at bugs.python.org
Fri Mar 5 01:03:36 EST 2021


Eric L. <ewl+python at lavar.de> added the comment:

Very confusing but very interesting. I'm trying to follow as I'm the main maintainer of the rdiff-backup software, which goes cross-platforms, so these small differences might become important.

Now, looking into the docs, following your explanations, I noticed that https://docs.python.org/3/library/os.html#os.fsencode and https://docs.python.org/3/library/os.html#os.fsdecode state that the 'strict' error handler is used under Windows instead of the stated 'surrogatepass'. Again an issue with the documentation?

Also, the 2nd paragraph of https://docs.python.org/3.8/library/os.html#file-names-command-line-arguments-and-environment-variables speaks only of surrogateescape and doesn't make the difference between POSIX and Windows.

Very interesting but very confusing...

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43395>
_______________________________________


More information about the Python-bugs-list mailing list