Sublime Text: [Decode error

今天编译Python时, 输出窗口信息出现:
[Decode error - output not utf-8]
[Decode error - output not utf-8]

发现是print不支持中文字符的输出, 需要修改python的build的setting, 打开Python.sublime-build,
修改为:

{
     "cmd": ["C:/Python33/python.exe", "-u", "$file"],
     "file_regex": "^[ ]*File "(...*?)", line ([0-9]*)",
     "selector": "source.python"
     "encoding": "cp936"
}

修改后用REPL可以正常输出, 但是Ctrl + B编译有问题, 空白没反映,可以按ctrl+‘来显示错误。

后来只能通过另外一种方法解决Unicode问题,
在系统变量加入PYTHONIOENCODING,值填写utf-8
win7在桌面,计算机右键选属性,选高级系统设置,选高级标签,选环境变量

重启sublime text2.
 
原文地址:https://www.cnblogs.com/muzizongheng/p/3172998.html