Once permanently resolve CMD window Kanji display garbled

Source: Internet
Author: User

For compiled programs, Chinese characters are not displayed correctly when CMD and power shell are running.
Online Search, you can re-order the window to modify:
1. Open the CMD.exe command Line window
2, change the code page through the chcp command, UTF-8 code page 65001
Chcp 65001
After you do this, the code page becomes UTF-8.

The current window does solve the problem, but the re-opened CMD window or power shell window still does not display the kanji correctly.

Finally, the CMD's property settings can be modified in the registry to make one modification always valid:

    1. Win+r enter Regedit to enter the registration form
    2. Find Hkey_current_user\console%systemroot%_system32_cmd.exe If the codepage item already exists under this key, change the value to decimal "65001", or if it does not exist, create a new DWORD (32-bit value), named "CodePage", with the value set to "65001"
    3. Effective after restarting CMD
    4. For power shell modifications, just modify the 2nd step
      The item under%systemroot%_system32_windowspowershell_v1.0_powershell.exe.

Appendix:
MS-DOS provides character sets for the following countries and languages:
Code page description
1258 Vietnamese
1257 the Baltic language
1256 Arabic
1255 Hebrew
1254 Turkish
1253 Greek
1252 Latin 1 characters (ANSI)
1251 Cyrillic language
1250 Central European languages
950 Traditional Chinese
949 Korean
936 Simplified Chinese (default)
932 Japanese
874 Thai
850 Multi-lingual (MS-DOS Latin1)
437 MS-DOS American English

Once permanently resolve CMD window Kanji display garbled

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.