Hello,
it seems the _json_loads method in cudax_lib.py will rasise error when the keys_json with CJK characters. Is there an option to set the decode to use cp936?
It happens with the macro plugin when read the keys.json
keys_js = apx._json_loads(open(keys_json).read()) if os.path.exists(keys_json) else {}
UnicodeDecodeError: 'gbk' codec can't decode byte 0xb0 in position 22826: illegal multibyte sequence
ERROR: Exception in CudaText for on_start: UnicodeDecodeError: 'gbk' codec can't decode byte 0xb0 in position 22826: illegal multibyte sequence
Traceback (most recent call last):
File "C:\Users\DELL\Desktop\cudatext\py\cuda_macros\cd_macros.py", line 82, in on_start
self._do_acts(acts='|reg|menu|')
File "C:\Users\DELL\Desktop\cudatext\py\cuda_macros\cd_macros.py", line 608, in _do_acts
self.adapt_menu()
File "C:\Users\DELL\Desktop\cudatext\py\cuda_macros\cd_macros.py", line 107, in adapt_menu
, hotkey=get_hotkeys_desc( 'cuda_macros,dlg_config'))
File "C:\Users\DELL\Desktop\cudatext\py\cuda_macros\cd_plug_lib.py", line 563, in get_hotkeys_desc
keys_js = apx._json_loads(open(keys_json).read()) if os.path.exists(keys_json) else {}
UnicodeDecodeError: 'gbk' codec can't decode byte 0xb0 in position 22826: illegal multibyte sequence
ERROR: Exception in CudaText for on_start: UnicodeDecodeError: 'gbk' codec can't decode byte 0xb0 in position 22826: illegal multibyte sequence
Init: cuda_project_man
Still exist errors,the full traceback is like above.