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 ezio.melotti, r.david.murray, serhiy.storchaka, stefanholek
Date 2012-10-24.13:15:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1351084501.5.0.98393595237.issue16310@psf.upfronthosting.co.za>
In-reply-to
Content
The problem you are reporting looks different than the problem addressed in issue 8390.  There, the surrogates are being introduced when reading filenames from the archive file.  Here, the surrogates presumably arose because the filename on your file system was not utf-8 encoded and so Python introduced the surrogates to preserve the filename.  The bug is that zipfile is not handling surrogates when *building* the archive...which may in fact be correct.  If I understand correctly there are two encodings supported by zipfile, a Microsoft code page and utf-8.  Anything else should probably be rejected as invalid, but with a better error message.  If you really need to include invalid filenames in an archive, we would introduce an explict flag for allowing that.

But, that's just my opinion.  ("Be generous in what you accept, and strict in what you send")
History
Date User Action Args
2012-10-24 13:15:01r.david.murraysetrecipients: + r.david.murray, ezio.melotti, stefanholek, serhiy.storchaka
2012-10-24 13:15:01r.david.murraysetmessageid: <1351084501.5.0.98393595237.issue16310@psf.upfronthosting.co.za>
2012-10-24 13:15:01r.david.murraylinkissue16310 messages
2012-10-24 13:15:01r.david.murraycreate