STINNER Victor added the comment:
> I think this was added in another section of this doc. See the second
> paragraph in
> https://docs.python.org/3/library/os.html#file-names-command-line-arguments-and-environment-variables
Right, this section now explains encodings and the error handler.
Irit Katriel added the comment:
I think this was added in another section of this doc. See the second paragraph
in
https://docs.python.org/3/library/os.html#file-names-command-line-arguments-and-environment-variables
--
nosy: +iritkatriel
___
Éric Araujo mer...@netwok.org added the comment:
Patch looks good, apart from a missing “the”, but I think it should be
expanded: Right now it tells that surrogateescape is used, but IMO it would be
more useful if it also mentioned practical implications, i.e. what Michael “The
Beard” Foord
misdre misdre+pyt...@gmail.com added the comment:
Added a small patch to mention surrogateescape and PEP 383.
--
keywords: +patch
nosy: +misdre
Added file: http://bugs.python.org/file23998/listdir-pep383.patch
___
Python tracker
STINNER Victor victor.stin...@haypocalc.com added the comment:
Can you please write a doc patch?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13561
___
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +eric.araujo, haypo, loewis
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13561
___
___
New submission from Michael Foord mich...@voidspace.org.uk:
Where os.listdir encounters undecodable bytes from the filesystem it uses the
surrogateescape handler. As the resulting strings are invalid they can't be
encoded without an errorhandler, and so can't be printed (for example).
This