Sublime Text 2 encoding error with python3 build

后端 未结 2 1219
没有蜡笔的小新
没有蜡笔的小新 2020-12-05 03:27

When running my python3 script from Sublime Text 2, the following error occures:

UnicodeEncodeError: \'ascii\' codec can\'t encode characters in position 0-2         


        
2条回答
  •  -上瘾入骨i
    2020-12-05 04:22

    Martin's solutions worked great! In Windows/Python3.5 environment just instead of "LANG" set the following:

    "env": {"PYTHONIOENCODING": "utf8"}
    

提交回复
热议问题