Created
March 17, 2020 04:53
-
-
Save stypr/23dd2a0bffcff42ce298719e968a6ea5 to your computer and use it in GitHub Desktop.
Unzip with different encoding
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
#Nothing on stackoverflow works! | |
import zipfile | |
import sys | |
zip = zipfile.ZipFile('FILENAME', 'r') | |
zipinfo = zip.infolist() | |
for _file in zipinfo: | |
_file.filename = bytes(_file.filename).decode('cp949') | |
zip.extract(_file) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment