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中文输出乱码 #14

Open
zxywx0924 opened this issue Sep 27, 2024 · 7 comments
Open

vscode中文输出乱码 #14

zxywx0924 opened this issue Sep 27, 2024 · 7 comments
Labels
question Further information is requested

Comments

@zxywx0924
Copy link

微信截图_20240927102316
微信截图_20240927104254
微信截图_20240927105604
微信截图_20240927105705

我寻求了chatgpt和csdn的帮助。。。csdn里面有的说要改uft-8,有的说是gb2312,然后我就都试了一下但是都不行。。。cmd里面强制更改chcp也试过了还是不行。。。settings里面添加了也不行。。。

@HalloMelon
Copy link
Collaborator

  • python文件是”文件名.py“。
  • 确保你使用的 Python 版本是支持 UTF-8 的。Python 3.x 对 UTF-8 的支持较好,如果你使用的是 Python 2,请切换到 Python 3。

image

image

  • 完成设置后,最好重启一下 VS Code 以确保所有配置生效。

@zxywx0924
Copy link
Author

微信截图_20240929100156
w
微信截图_20240929100249
zhi'q
微信截图_20240929100309
微信截图_20240929100440
之前那个文件后缀是因为截图截错了。。。python也是有试的,也是不能输出中文。。。
按之前那个回答的操作做了。。。中文还是无法输出。。。麻烦老师再帮忙看看。。。

@HalloMelon
Copy link
Collaborator

点击终端让我看看
image

@zxywx0924
Copy link
Author

微信截图_20240929202828
麻烦老师了!

@HalloMelon
Copy link
Collaborator

执行了吗,怎么什么输出都没有

@HalloMelon HalloMelon added the question Further information is requested label Sep 29, 2024
@zxywx0924
Copy link
Author

执行了。。。(我用邮箱回复了。。。没想到传不上来。。。)老师待会额可以捞捞吗/kk

@Tenth-crew
Copy link
Collaborator

参考其中解决方案3 https://blog.csdn.net/didi_ya/article/details/107883798

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants