使用 Sublime 工具时编译javaScript时,报Decode error - output not utf-8解决办法
打开nodejs.sublime-build文件,并添加"encoding":"cp936"这一行,保存即可
{
"cmd": ["node", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.js",
"shell":true,
"encoding":"cp936",
"windows":
{
"cmd": ["taskkill /F /IM node.exe & node", "$file"]
},
"linux":
{
"cmd": ["killall node; node", "$file"]
}
}
"cmd": ["node", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.js",
"shell":true,
"encoding":"cp936",
"windows":
{
"cmd": ["taskkill /F /IM node.exe & node", "$file"]
},
"linux":
{
"cmd": ["killall node; node", "$file"]
}
}
本文介绍了解决在Sublime Text中编译JavaScript时出现的Decode error-output not utf-8问题的方法。通过在nodejs.sublime-build配置文件中添加编码设置为cp936,可以有效解决此问题。
8828

被折叠的 条评论
为什么被折叠?



