What should I do if the vscode editor outputs Chinese garbled characters?

藏色散人
Release: 2020-04-08 09:09:01
Original
4983 people have browsed it

What should I do if the vscode editor outputs Chinese garbled characters?

#What should I do if vscode outputs Chinese garbled characters?

VS Code output will appear garbled, many people have encountered it. This is because VS Code uses utf-8 encoding internally, and cmd/Powershell uses gbk encoding. Direct compilation will output "Hello" into "Huan Hui". If you change the active code page of cmd to 65001, there will be a problem that only half of the Chinese characters can be displayed, and how to change it to UTF8 is still a problem

The default character encoding of the Windows system is gbk encoding, and the development project encoding is generally UTF -8. Encoding problems often trouble us when we execute programs and program encoding. If we change the system default encoding to UTF-8, we can solve the problem of garbled characters displayed on the console and facilitate application development and debugging.

The win10 system provides a test version configuration method to configure the system default encoding to UTF-8. The following are the configuration steps:

Recommended related tutorials:vscode tutorial

Solution

Win10 configures the system default utf-8 Encoding

What should I do if the vscode editor outputs Chinese garbled characters?

What should I do if the vscode editor outputs Chinese garbled characters?

What should I do if the vscode editor outputs Chinese garbled characters?

##

The above is the detailed content of What should I do if the vscode editor outputs Chinese garbled characters?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!