In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you the solution to vscode terminal garbled, I hope you will gain something after reading this article, let's discuss it together!
Vscode terminal garbled code
The VSCode terminal actually calls cmd.exe, so when Chinese garbled occurs here, the problem to be solved is the coding setting of cmd.
You can check the code settings of cmd through the chcp command. The code page number of GBK2312 is 936, and then change it to the code of utf-8. The code page number of utf-8 is 65001, so you can set the code of cmd to uft-8 by executing chcp 65001. This solves the problem of garbled code.
1. View the original code
two。 Execute the chcp 65001 command
The above solution requires entering commands in the VSCode terminal every time: chcp 65001. This method is too troublesome. You have to enter commands every time you enter the terminal. Is there a permanent solution? Of course there is.
In VSCode, copy the following three lines by opening "File"-"preferences"-"Settings" and setting it in setting.json:
{"terminal.integrated.shellArgs.windows": ["/ K chcp 65001 > nul"], / / two optional "terminal.integrated.fontFamily": "Lucida Console", "editor.fontSize": 18}
/ K chcp 65001 > nul means to set the encoding to 65001 when running cmd
> nul is to avoid outputting the modified code on the console, otherwise it will output active code page: 65001
The following two profiles are optional:
Editor.fontSize: 20 (change the font size to 20)
Terminal.integrated.fontFamily; "Courier New" (font changed to "Courier New").
After reading this article, I believe you have a certain understanding of "vscode terminal garbled solution". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for your 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.