解决Win平台VSCode中Python在控制台输出中文乱码的问题

在菜单Debug->Open Configurations,打开launch.json,新增如下粉红色字符内容:

{
    "configurations": [        
        {
            "name": "Python: 当前文件",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "env":{
                "PYTHONIOENCODING":"gbk"
            }
        }
    ]
}

来源:https://www.cnblogs.com/airscrat/p/12067480.html

原文地址:https://www.cnblogs.com/liuyanhang/p/13750176.html