Message124690
| 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:10 | r.david.murray | set | recipients:
+ r.david.murray, loewis, aimacintyre, connexion2000 |
| 2010年12月27日 00:45:10 | r.david.murray | set | messageid: <1293410710.01.0.448580835766.issue10757@psf.upfronthosting.co.za> |
| 2010年12月27日 00:45:06 | r.david.murray | link | issue10757 messages |
| 2010年12月27日 00:45:06 | r.david.murray | create |
|