Home  >  Article  >  Development Tools  >  What should I do if the vscode editor outputs Chinese garbled characters?

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

藏色散人
藏色散人Original
2020-04-08 09:09:015056browse

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!

Statement:
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