Skip to content

Instantly share code, notes, and snippets.

@takehaya
Created December 21, 2019 10:06
Show Gist options
  • Save takehaya/fb687950d16fa680280214ed7dcf27ad to your computer and use it in GitHub Desktop.
Save takehaya/fb687950d16fa680280214ed7dcf27ad to your computer and use it in GitHub Desktop.
#! /usr/bin/env python3
import sys
from zipfile import ZipFile
with ZipFile(sys.argv[1]) as zip:
for info in zip.infolist():
name = info.filename.encode('cp437').decode('cp932')
info.filename = name
print(info.filename)
zip.extract(info)
@takehaya
Copy link
Author

./unzip.py hoge.zip で動く

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment