Skip to content

Commit

Permalink
Support utf-8 channel name (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
nindanaoto authored May 26, 2023
1 parent d33d2a9 commit f770f73
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion slackviewer/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,12 @@ def extract_archive(filepath):
# Extract zip
with zipfile.ZipFile(filepath) as zip:
print("{} extracting to {}...".format(filepath, extracted_path))
zip.extractall(path=extracted_path)
for info in zip.infolist():
print(info.filename)
info.filename = info.filename.encode("cp437").decode("utf-8")
print(info.filename)
zip.extract(info,path=extracted_path)


print("{} extracted to {}".format(filepath, extracted_path))

Expand Down

0 comments on commit f770f73

Please sign in to comment.