Skip to content

Commit c59ea55

Browse files
committed
Explicit encoding for opening files which should fix everything
1 parent 299d38a commit c59ea55

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

minecraft_data/tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
def convert(_dir, version, edition ='pc'):
7-
with open(os.path.join(_dir, 'dataPaths.json')) as f:
7+
with open(os.path.join(_dir, 'dataPaths.json'), encoding='utf-8') as f:
88
datapaths = json.load(f)
99
data = _grabdata(_dir, datapaths[edition][version])
1010
ret = {}
@@ -49,7 +49,7 @@ def commondata(_dir, edition = 'pc'):
4949
common_path = os.path.join(_dir, edition, 'common')
5050
for common_file in os.listdir(common_path):
5151
key = common_file.split('.', 1)[0]
52-
with open(os.path.join(common_path, common_file)) as f:
52+
with open(os.path.join(common_path, common_file), encoding='utf-8') as f:
5353
data = json.load(f)
5454
ret.update({key: data})
5555
return ret

0 commit comments

Comments
 (0)