VSCode 中文乱码

vscode 菜单栏:  文件 >> 首选项 >> 设置

搜索:

"files.autoGuessEncoding": false,

改为:

"files.autoGuessEncoding": true,

修改task.json,添加option那一段:

{
    "version": "0.1.0",
    "command": "python",
    "isShellCommand": true,
    "args": ["${file}"],
    "showOutput": "always",
    "options": {
        "env":{
            "PYTHONIOENCODING": "UTF-8"
          }
      }
}

猜你喜欢

转载自www.cnblogs.com/hankleo/p/11570643.html