]> git.phdru.name Git - dotfiles.git/commitdiff
unzip.py: Fix encoding
authorOleg Broytman <phd@phdru.name>
Sat, 4 Nov 2023 12:53:17 +0000 (15:53 +0300)
committerOleg Broytman <phd@phdru.name>
Sat, 4 Nov 2023 12:53:17 +0000 (15:53 +0300)
bin/unzip.py

index e88e5265a5504d69949ec375d348845424f33e1d..dd0a79f5931503e1bf358006ec2719a9eac61075 100755 (executable)
@@ -30,7 +30,7 @@ for zinfo in zf.infolist():
         path = path.decode('cp866')
         recoded_path = path.encode(default_encoding)
     else:
-        recoded_path = path
+        recoded_path = path.encode('cp437').decode('cp866')
     print(recoded_path)
 
     if path.startswith('./'):