godot-gdscript-toolkit
godot-gdscript-toolkit copied to clipboard
It seems that this toolkit dosen't support GBK
I start to convert my 3.x project to 4.0, and run 'gdformat' command to format my script. But I got an error like this:
C:\Users\73517>gdformat C:\Users\73517\OneDrive\Godot\Project\equipment-manage-system\addons\table\Table.gd
Traceback (most recent call last):
File "C:\Users\73517\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return run_code(code, main_globals, None,
File "C:\Users\73517\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\73517\AppData\Local\Programs\Python\Python310\Scripts\gdformat.exe_main.py", line 7, in
I wrote many script comments in Chinese, I'm sure that this is the reason of the error. Because of lacking of knowledge of character coding and python, I don't know how to solve it.
@Daylily-Zeleen Can you share 1 example file which fails like above? Btw. Please note that GDScript 2.0 is not yet fully supported.
I‘m not familiar with the workflow of convert to 4.0, I just try to obey the description of qarmin's pr.
Here is my minimized example script code:
""" 测试脚本: """ extends Node
var a = 1
After I do some test, the reason of this error is Chinese punctuation mark , such as ':', ',' and so on, instead of the Chinese words like '测试'.