你好,请在配之json文件时,加入encoding那一行就行,类似这种:
{
"cmd": ["C:\\Program Files\\MATLAB\\R2020a\\bin\\matlab.exe", "${file}", "-nodesktop", "-nosplash", "-r", "${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"selector": "source.m",
"encoding":"cp936",
"working_dir": "${file_path}",
"shell":true,
"variants":
[
{
"name": "Run",
"cmd": ["cmd", "/c", "C:\\Program Files\\MATLAB\\R2020a\\bin\\matlab.exe", "${file}", "-r", "-nodesktop", "-nosplash", "${file_base_name}"]
}
]
}
里面的"encoding":"cp936",
就是让你的汉字显示不乱码