Skip to content

Commit

Permalink
FIX: use utf-8 encoding when opening files
Browse files Browse the repository at this point in the history
  • Loading branch information
desty2k committed Jun 20, 2021
1 parent fb96c0c commit c601562
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions paker/paker.py
Expand Up @@ -48,7 +48,7 @@ def _dump(module: types.ModuleType, skip_main):
modules = {"type": "package",
"code": "",
"modules": {}}
with open(module.__file__, "r") as f:
with open(module.__file__, "r", encoding="utf8") as f:
try:
modules["code"] = f.read()
except Exception as e:
Expand Down Expand Up @@ -76,7 +76,7 @@ def _dump(module: types.ModuleType, skip_main):
if full_module.__file__.endswith(".pyd"):
continue

with open(full_module.__file__, "r") as f:
with open(full_module.__file__, "r", encoding="utf8") as f:
module_src = f.read()

modules["modules"][module_name] = {"type": "module",
Expand Down

0 comments on commit c601562

Please sign in to comment.