cmd/compiler cannot input Chinese in Windows-based environment, display Chinese garbled solution

Source: Internet
Author: User

cmd/compiler cannot input Chinese in Windows-based environment, display Chinese garbled solution

Two months ago to do C + + lesson set, the computer compiler compiled results appeared in Chinese garbled, to seek the Baidu and the great God, have not solved this problem, Baidu on a bunch of explanations is the compiler to set the same, the results have no effect, summer study with DOS to develop Java programs, Input cmd command in dir (directory) for query operation, display a bunch of Chinese garbled, originally wanted to reload the system, because the computer inside a little more important things, so I spent a period of time to tinker with a computer, finally solved as two questions, now the heart is very happy, attached the following two pictures:

CMD query interface: (Chinese)

Codeblocks Compile Interface: (Chinese display)

How to do it, please continue to look down:

CMD is usually found in the cmd in the cause, also can be used in regedit, that is, the registry to solve.

After reading this, you can also learn about CMD and regedit in closer step. The following is a personal experience, only for reference, not to represent the official opinion.

Specific solutions:

1. Right-click the cmd window and click the default value . In the options Default code page , select 936.

2. Enter in cmd :

CHCP 936

Note:the CHCP command is used to display or set the active code page number.

3 . Create new text, copy and paste the following code, change the file type to reg : Windows Registry Editor Version 5.00 [hkey_current_user\console\% Systemroot%_system32_cmd.exe] "CodePage" =dword:000003a8

Then double-click Run. Point is.

4 . Run regeditto open the registry.

Find CodePagein the hkey_current_user\console\%systemroot%_system32_cmd.exe .

Double hit Open CodePage, enter 3a8

After completing the above four steps, I believe you have successfully solved the garbled problem! A little technical talk, will also share more experience articles to everyone!

cmd/compiler cannot input Chinese in Windows-based environment, display Chinese garbled solution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.