Skip to content

Commit

Permalink
Merge pull request #51 from lixiang810/patch-1
Browse files Browse the repository at this point in the history
Fix error in Windows in zh_CN locale
  • Loading branch information
gnikit authored Feb 23, 2022
2 parents 914ff47 + a3ffc88 commit 372b461
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fortls/intrinsics.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def add_children(json_obj, fort_obj):
os.path.dirname(os.path.abspath(__file__)), "statements.json"
)
statements = {"var_def": [], "int_stmnts": []}
with open(json_file, "r") as fid:
with open(json_file, "r", encoding="utf-8") as fid:
intrin_file = json.load(fid)
for key in statements:
for name, json_obj in sorted(intrin_file[key].items()):
Expand All @@ -153,7 +153,7 @@ def add_children(json_obj, fort_obj):
os.path.dirname(os.path.abspath(__file__)), "keywords.json"
)
keywords = {"var_def": [], "arg": [], "type_mem": [], "vis": [], "param": []}
with open(json_file, "r") as fid:
with open(json_file, "r", encoding="utf-8") as fid:
intrin_file = json.load(fid)
for key in keywords:
for name, json_obj in sorted(intrin_file[key].items()):
Expand All @@ -164,7 +164,7 @@ def add_children(json_obj, fort_obj):
os.path.dirname(os.path.abspath(__file__)), "intrinsic_funs.json"
)
int_funs = []
with open(json_file, "r") as fid:
with open(json_file, "r", encoding="utf-8") as fid:
intrin_file = json.load(fid)
for name, json_obj in sorted(intrin_file.items()):
int_funs.append(create_int_object(name, json_obj, json_obj["type"]))
Expand All @@ -175,7 +175,7 @@ def add_children(json_obj, fort_obj):
os.path.dirname(os.path.abspath(__file__)), "intrinsic_mods.json"
)
int_mods = []
with open(json_file, "r") as fid:
with open(json_file, "r", encoding="utf-8") as fid:
intrin_file = json.load(fid)
for key, json_obj in intrin_file.items():
fort_obj = create_object(json_obj)
Expand Down

0 comments on commit 372b461

Please sign in to comment.