> This sounds like a strong prospect for how to get things working (I > didn't realize open would accept a bytes argument for the filename), > but I'm also interested in whether reading filenames from stdin and > subsequently opening them is supposed to "just work" given a suitable > encoding - like with Java which also uses unicode strings. In Java, > I'm told that ISO-8859-1 is supposed to "guarantee a roundtrip > conversion".
It's the same in Python. However, as in Java, Python will *not* necessarily use ISO-8859-1 when you pass a (Unicode) string to open; instead, it will (as will Java) use your locale's encoding. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list