Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在 vscode 中编写 python 代码,输出中文时,控制台输出为乱码解决方法 #1

Open
AlexZ33 opened this issue Mar 3, 2021 · 0 comments

Comments

@AlexZ33
Copy link
Member

AlexZ33 commented Mar 3, 2021

在 vscode 中编写 python 代码,输出中文时,控制台输出为乱码解决方法

image

先检查右下角编码集设置是否正确

image

修改完后运行仍不行,可以在”文件”-”首选项”-”用户设置”中搜索 code-runner.executorMap 选项,提示需要在 setting.json 中修改

image

在 json 中添加下列属性

"code-runner.executorMap": {
"python": "set PYTHONIOENCODING=utf8 && python -u"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant