On Tue, Nov 30, 2010 at 11:47 AM, Martin v. Loewis <mar...@v.loewis.de> wrote: >> Does anyone know what I need to do to read filenames from stdin with >> Python 3.1 and subsequently open them, when some of those filenames >> include characters with their high bit set? > > If your files on disk use file names encoded in iso-8859-1, don't set > your locale to a UTF-8 locale (as you apparently do), but set it to > a locale that actually matches the encoding that you use. > > Regards, > Martin >
It'd be great if all programs used the same encoding on a given OS, but at least on Linux, I believe historically filenames have been created with different encodings. IOW, if I pick one encoding and go with it, filenames written in some other encoding are likely to cause problems. So I need something for which a filename is just a blob that shouldn't be monkeyed with. -- http://mail.python.org/mailman/listinfo/python-list