从 Sublime Text 2 运行我的 python3 脚本时,出现以下错误:
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128)
此外,从终端运行相同的脚本时,不会出现问题。
Sublime 的构建系统设置如下:
{
"cmd": ["python3", "-u", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python",
"encoding": "utf8",
"path": "/Library/Frameworks/Python.framework/Versions/3.3/bin/"
}
提前致谢!