This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients aimacintyre, connexion2000, loewis, r.david.murray
Date 2010-12-27.00:45:06
SpamBayes Score 3.7494507e-11
Marked as misclassified No
Message-id <1293410710.01.0.448580835766.issue10757@psf.upfronthosting.co.za>
In-reply-to
Content
Well, this is the same treat-strings-and-byte-strings-equivalently-in-the-same-API problem that we've had elsewhere.  It'll require a bit of refactoring to make it work.

On read zipfile decodes filenames using cp437 if the utf-8 flag isn't set.  Logically, then, a binary string should be encoded using cp437.  Since cp437 has a character corresponding to each of the 256 bytes, it seems to me it should be enough to decode a binary filename using cp437 and set a flag that _encodeFilenameFlags would respect and re-encode to cp437 instead of utf-8.  That might produce unexpected results if someone passes in a binary filename encoded in some other character set, but it would be consistent with how zipfiles work and so should be at least as interoperable as zipfiles normally are.
History
Date User Action Args
2010-12-27 00:45:10r.david.murraysetrecipients: + r.david.murray, loewis, aimacintyre, connexion2000
2010-12-27 00:45:10r.david.murraysetmessageid: <1293410710.01.0.448580835766.issue10757@psf.upfronthosting.co.za>
2010-12-27 00:45:06r.david.murraylinkissue10757 messages
2010-12-27 00:45:06r.david.murraycreate