在用sublime text3编译调试python3的代码时,发现输出窗口中的中文显示的是乱码.
解决办法是:在sublime text3的菜单栏选择 Tools->Build System->New Build System…,然后在打开的文件中输入下面的代码,把原有内容替换。
{ "cmd": ["D:/Users/Administrator/AppData/Local/Programs/Python/Python38-32/python.exe","-u", "$file"], //自己安装路径 "file_regex":"^[ ]*File "(...*?)", line ([0-9])*", "selector": "source.python", "encoding": "cp936" }
D:Program FilesSublime Text 3DataPackagesUseruntitled.sublime-build
具体文件