Skip to content

Commit 1e464f0

Browse files
authored
Merge branch 'master' into feature/dataclasses
2 parents 9040c8f + 443c933 commit 1e464f0

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# CHANGELONG
22

3+
## 2.2.3
4+
5+
### Changed
6+
7+
- Changed reading in `json` files to be encoded as UTF-8
8+
([#51](https://github.com/gnikit/fortls/pull/51))
9+
310
## 2.2.2
411

512
### Changed

fortls/intrinsics.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def add_children(json_obj, fort_obj):
142142
os.path.dirname(os.path.abspath(__file__)), "statements.json"
143143
)
144144
statements = {"var_def": [], "int_stmnts": []}
145-
with open(json_file, "r") as fid:
145+
with open(json_file, "r", encoding="utf-8") as fid:
146146
intrin_file = json.load(fid)
147147
for key in statements:
148148
for name, json_obj in sorted(intrin_file[key].items()):
@@ -153,7 +153,7 @@ def add_children(json_obj, fort_obj):
153153
os.path.dirname(os.path.abspath(__file__)), "keywords.json"
154154
)
155155
keywords = {"var_def": [], "arg": [], "type_mem": [], "vis": [], "param": []}
156-
with open(json_file, "r") as fid:
156+
with open(json_file, "r", encoding="utf-8") as fid:
157157
intrin_file = json.load(fid)
158158
for key in keywords:
159159
for name, json_obj in sorted(intrin_file[key].items()):
@@ -164,7 +164,7 @@ def add_children(json_obj, fort_obj):
164164
os.path.dirname(os.path.abspath(__file__)), "intrinsic_funs.json"
165165
)
166166
int_funs = []
167-
with open(json_file, "r") as fid:
167+
with open(json_file, "r", encoding="utf-8") as fid:
168168
intrin_file = json.load(fid)
169169
for name, json_obj in sorted(intrin_file.items()):
170170
int_funs.append(create_int_object(name, json_obj, json_obj["type"]))
@@ -175,7 +175,7 @@ def add_children(json_obj, fort_obj):
175175
os.path.dirname(os.path.abspath(__file__)), "intrinsic_mods.json"
176176
)
177177
int_mods = []
178-
with open(json_file, "r") as fid:
178+
with open(json_file, "r", encoding="utf-8") as fid:
179179
intrin_file = json.load(fid)
180180
for key, json_obj in intrin_file.items():
181181
fort_obj = create_object(json_obj)

0 commit comments

Comments
 (0)