LANG, locale, unicode, and Debian packaging

"Martin v. Löwis" martin at
Tue Jan 15 07:08:18 CET 2008

>    Has it been decided how Python 3.0 will implement os.listdir on Unix?
> Will there be only a single attempt to encode using the current locale
> or will there be a backup technique?

That's what it currently does.

> I'd probably define an optional
> encoding parameter so you can ask for os.listdir(encoding="iso-8859-1")
> although that then propagates into open, ...

I had the same idea, and I think that parameter should be added.

For open(), I think we should continue to accept byte strings as file


More information about the Python-list mailing list