[Python-Dev] Windows: Remove support of bytes filenames in theos module?
Stephen J. Turnbull
stephen at xemacs.org
Wed Feb 10 09:50:21 EST 2016
Andrew Barnert via Python-Dev writes:
> That doesn't mean the problem can't be solved. Apple solved their
> equivalent problem, albeit by sacrificing backward compatibility in
> a way Microsoft can't get away with. I haven't seen a MacRoman or
> Shift-JIS filename since they broke the last holdout
If you lived where I do, you'd still be seeing both, because you
wouldn't be able to escape archival files on CD and removable media
(typically written on Windows boxen). They still work, sort of ==
same as always, and as far as I know, that's because Apple has *not*
sacrificed backward compatibility: under the hood, Darwin is still a
POSIX kernel which thinks of file names and everything else outside of
memory as bytestreams.
One place they *fail very badly* is Shift JIS filenames in zipfiles,
which nothing provided by Apple can deal with safely, and InfoZip
breaks too (at least in MacPorts). Yes, I know that is specifically
disallowed. Feel free to tell 1_0000_0000 Japanese Windows users.
Thank heaven for Python there! A three-line hack and I'm free!
> So Python 2 works great on Macs, whether you use bytes or
> unicode. But that doesn't help us on Windows, where you can't use
> bytes, or Linux, where you can't use Unicode (without surrogate
> escape or some other mechanism that Python 2 doesn't have).
You contradict yourself! ;-)
More information about the Python-Dev
mailing list