Visual Studio Code 中 CodeRunner 插件的输出窗口中文乱码

file
原来我一直用 Pycharm 写代码,Pycharm 写代码虽然很方便,但是Pycharm 有点重,我转到了Vscode了,真香。

在 Visual Studio Code 中安装 CodeRunner 插件后,直接运行 Python 代码的时候,输出窗口中的中文出现了乱码,像这样:

经过谷歌的一番搜索,找到如下方法,让输出的结果在 Terminal 中运行

打开 首选项 - 设置,在用户设置中加入

“code-runner.runInTerminal”:true,

// 意思是让 CodeRunner 在你的终端中运行。
全部代码如下:

{
“window.zoomLevel”: 1,
“workbench.colorTheme”: “Atom One Dark”,
“breadcrumbs.enabled”: false,
“git.enableSmartCommit”: true,
“editor.suggestSelection”: “first”,

"editor.fontFamily":"'Fira Code','Operator Mono', Consolas, 'Courier New', monospace",
"editor.fontLigatures": true,
"editor.fontSize": 14,
"files.autoSave": "afterDelay",
"editor.minimap.enabled": false,


"go.goroot": "C:\\Go",
"go.gopath": "D:\\Go_WorkSpace",
"python.jediEnabled": false,


"code-runner.runInTerminal":true,

}
设置后的运行效果:

file

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值