[issue3187] os.listdir can return byte strings

Guido van Rossum report at bugs.python.org
Tue Sep 30 19:04:28 CEST 2008


Guido van Rossum <guido at python.org> added the comment:

On Tue, Sep 30, 2008 at 8:21 AM, Martin v. Löwis <report at bugs.python.org> wrote:
> Martin v. Löwis <martin at v.loewis.de> added the comment:
> Here is a patch that solves the issue in a different way: it introduces
> sys.setfilesystemencoding. If applications invoke
> sys.setfilesystemencoding("iso-8859-1"), all file names can be
> successfully converted into a character string.

I'm not opposed to this going in as well, but I don't think it's the
right approach, as it can cause severe cases of mojibake (which you
have strongly opposed in the past). It's quite orthogonal to Victor's
patch IMO.

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3187>
_______________________________________


More information about the Python-bugs-list mailing list