On Mon, Oct 6, 2008 at 11:23 PM, Glenn Linderman <[EMAIL PROTECTED]> wrote: > On approximately 10/6/2008 10:18 PM, came the following characters from the > keyboard of Adam Olsen: >> But "Unicode" on windows is invalid. It shares all the same problems >> UTF-8b does, but worse as a correct UTF-16 codec would forbid >> exporting it. We'd need to invent a UTF-16b to save it, or simulate >> one manually. >> >> If the binary APIs on windows emitted raw UTF-16 bytes >> >> They do, for some definition of UTF-16, yes. >> >> then we merely >> need to add a os.sepb equal to os.sep.encode('UTF-16') and you've got >> your portable low-level API. You don't need a path object. > > Except it isn't portable, because you can't do that on Posix.
The posix version should hardcode it as b'/'; I only meant windows to use UTF-16. You could perhaps use sys.getfilesystemencoding(), but I'm unsure what it does if the encoding isn't an ascii superset (or even if that can actually happen.) -- Adam Olsen, aka Rhamphoryncus _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com