VSCODE+python3中文乱码问题

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/SONGYINGXU/article/details/79029840

被这个问题困扰了好久。各种百度各种尝试。最后在知乎找到了答案。
修改task.json,添加option那一坨:

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

参考:
https://www.zhihu.com/question/41282749

猜你喜欢

转载自blog.csdn.net/SONGYINGXU/article/details/79029840