[issue40172] ZipInfo corrupts file names in some old zip archives

Yudi Levi report at bugs.python.org
Sat Mar 5 18:46:14 EST 2022


Yudi Levi <yudilevi at gmail.com> added the comment:

The main issue is that when extracting older zip files, files are actually written to disk with corrupted (altered) names.
Unfortunately it's been a while since I saw this issue and I can't tell if it was fixed or if I simply can't reproduce it.
I do see that encoding/decoding in ZipInfo is still inconsistent, sometimes uses ascii codepage and sometimes uses cp437 codepage which seems wrong to me.
Not sure how we should handle it but I think that switching the default ascii encoding to cp437 to be consistent with the old implementation (and with the filename decoding) seems like the right way to go.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40172>
_______________________________________


More information about the Python-bugs-list mailing list