今天编译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.
查看更多关于Sublime Text: [Decode error - output not utf-8]的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did126804