In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
 
            
                     
                
2025-10-31 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.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about

The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r


A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from

Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





 
             
            About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.