Skip to content

Commit

Permalink
Add encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianeboyd committed May 20, 2020
1 parent fabd56e commit 23d55a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def gzip_language_data(root, source):
# If the gz is newer it doesn't need updating
print("Skipping {}, already compressed".format(jsonfile))
continue
with open(str(jsonfile), 'r') as infileh, gzip.open(str(outfile), 'w') as outfileh:
with open(str(jsonfile), 'r', encoding="utf-8") as infileh, gzip.open(str(outfile), 'w') as outfileh:
outfileh.write(infileh.read().encode("utf-8"))
print("Compressed {}".format(jsonfile))

Expand Down

0 comments on commit 23d55a4

Please sign in to comment.