Commit a3ffc88
authored
Fix error in Windows in zh_CN locale
By default python in Windows in zh_CN will use GBK to open files, since we're using UTF-8 now, it will throw error like this:
Traceback (most recent call last):
File "C:\Program Files\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Program Files\Python310\Scripts\fortls.exe\__main__.py", line 7, in <module>
File "C:\Program Files\Python310\lib\site-packages\fortls\__init__.py", line 56, in main
LangServer(
File "C:\Program Files\Python310\lib\site-packages\fortls\langserver.py", line 119, in __init__
) = load_intrinsics()
File "C:\Program Files\Python310\lib\site-packages\fortls\intrinsics.py", line 168, in load_intrinsics
intrin_file = json.load(fid)
File "C:\Program Files\Python310\lib\json\__init__.py", line 293, in load
return loads(fp.read(),
UnicodeDecodeError: 'gbk' codec can't decode byte 0x99 in position 11899: illegal multibyte sequence1 parent 914ff47 commit a3ffc88
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
| 167 | + | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| |||
0 commit comments