LANG, locale, unicode, setup.py and Debian packaging

"Martin v. Löwis" martin at v.loewis.de
Tue Jan 15 01:08:18 EST 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
names.

Regards,
Martin



More information about the Python-list mailing list