From 9ff84c7e331fa75a8c93a44cbed2bd0035889652 Mon Sep 17 00:00:00 2001 From: nergall2 <63109814+nergall2@users.noreply.github.com> Date: Fri, 3 Apr 2020 18:11:38 +0300 Subject: [PATCH] bop-40172: fixed old zip filename corruption --- Lib/zipfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/zipfile.py b/Lib/zipfile.py index 5dc6516cc47..50edbbf1756 100644 --- a/Lib/zipfile.py +++ b/Lib/zipfile.py @@ -454,7 +454,7 @@ class ZipInfo (object): def _encodeFilenameFlags(self): try: - return self.filename.encode('ascii'), self.flag_bits + return self.filename.encode('cp437'), self.flag_bits except UnicodeEncodeError: return self.filename.encode('utf-8'), self.flag_bits | 0x800