Open whc2001 opened 2 years ago
lua-debug will not do any processing on the output of print. You can output to the terminal instead of the debug console to solve this problem.
"console": "integratedTerminal",
"outputCapture": [
],
I tried to put these to launch.json
but seems like it still does not work.
I can't reproduce.
Seems like the problem is that it's still using the built-in terminal rather than using cmd from Windows. I tried to run the script with lua5.1.exe from cmd and it prints correctly.
"Lua.runtime.version": "Lua 5.1", "files.encoding":"gb2312", "lua.debug.settings.consoleCoding": "ansi", "lua.debug.settings.sourceCoding": "ansi", "Lua.runtime.fileEncoding": "ansi", "lua.debug.settings.luaVersion": "5.1",
但是如果将文件编码改为utf8,print就能输出中文,(项目要求GB2312...)
调试过程中,变量页内容涉及到中文也全都显示乱码。
I have a lot of lua source files encoded in GB2312, and my OS locale is
zh-CN
(same with non-Unicode locale settings). I tried every setting combinations of "Console Coding" and "Source Coding" in plugin settings, but seems like the Chinese characters cannot be displayed correctly. If I save as UTF-8 then it works. Anyway to solve that since in the production environment I'll have to use GB2312?