用 coderunner 插件运行 Python 文件
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128) 报错提示这个
问题是我已经在文件最上面加了
-- coding: utf-8 --
而且 vsc 的设置里 files.encoding": "utf8", 也设置好了
这是为什么呢?
用 coderunner 插件运行 Python 文件
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128) 报错提示这个
问题是我已经在文件最上面加了
而且 vsc 的设置里 files.encoding": "utf8", 也设置好了
这是为什么呢?
|
1
你好,我是插件作者。你 py 文件内容是啥,里面有中文?可以试试这里面的三种解决方案: https://github.com/formulahendry/vscode-code-runner/issues/25
|
|
2
@formulahendry 好啦好啦!!谢谢谢谢!!!!顺便一提 你的插件好棒的!
|
|
formulahendryFeb 26, 2017 via Android
3
@Anhedonia 😀
|
|
kevin100702Feb 26, 2017 via Android
4
Import Io
Io.set ………… 原谅我不会手机打代码 |
|
WildCatFeb 26, 2017 via iPhone
5
@formulahendry 全球第一工单论坛 😂
|
|
suixnFeb 27, 2017
6
···
import io sys.stdout = io.TextIOWrapper(sys.stdout.buffer,encoding='utf8') ··· |