VSCode中文乱码

解决方法1

在文件头输入

# -*-coding:utf-8 -*-
import io
import sys
#改变标准输出的默认编码
sys.stdout=io.TextIOWrapper(sys.stdout.buffer,encoding='utf8')

解决方法2

安装了coderunner插件之后> ctrl shift p>搜索setting.json>输入以下内容

"code-runner.executorMap": {
    "python": "set PYTHONIOENCODING=utf8 &&python",
}

https://www.cnblogs.com/charleswong/p/11367196.html
https://blog.csdn.net/qq_35349715/article/details/79391464

posted @ 2020-07-04 11:52  NAIXIL  阅读(134)  评论(0编辑  收藏  举报