In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Xiaobian to share with you how to solve the vscode console Chinese garbled problem, I hope you have read this article after the harvest, let us discuss it together!
First of all, the C language running program is called cmd.exe, while the Windows cmd code defaults to 936, that is, gb2312.
Run->cmd-> Right click-> Properties at the head of the white window to view, mainly now with utf-8 more, so with utf-8 encoded c program appeared garbled.
1. Modify character encoding in cmd or vscode console
chcp can view the current console character encoding;
You can modify the encoding with chcp 65001, and the following message will be displayed to indicate that the modification was successful, but it is only useful if it is currently open. The next time I open it, it will be GBK again. This way in the case of code is utf-8 can be corrected garbled to see the effect.
1. cmd console:
Enter the running program directory and run the program. For example, my C program is at d: /c/a.exe. After entering CMD.
d:cd cchcp 65001a.exe
Can be in the case of character encoding utf-8, the program output Chinese.
2, vs code console
Same as CMD, but only 2 lines
chcp 65001.\ a.exe
the terminal can see the message again.
Second, in vs code modify the code open and save way
Save the code directly as gb2312. In the lower right corner of vs code, you can see the current file encoding method. Click utf-8 to modify the open and save method to gb2312.
After reading this article, I believe you have a certain understanding of "how to solve the problem of Chinese garbled code in vscode console." If you want to know more relevant knowledge, please pay attention to the industry information channel. Thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.