Change the CMD code page to correct the language display

Source: Internet
Author: User

1234567891011121314151617 rem 英文chcp 437rem 日文chcp 932 rem 简体中文chcp 936 rem 韩文chcp 949 rem 繁体中文chcp 950rem utf-8chcp 65001

If the default code page properties of CMD are not modified, then modify the registry:

1 win key +r Open the Run dialog box and enter Regedit to open the Registry Editor.

2 found [Hkey_current_user\console\%systemroot%_system32_cmd.exe]

3 Modify "CodePage" =dword:000003a8

"Note" hexadecimal "000003a8" or decimal "936", which means "936 (ansi/oem-Simplified Chinese GBK)".

If the UTF-8 character is still not displayed correctly after you change the code page to 65001, you need to change the font properties: Right-click on the command line title bar, select Properties, font, and change the font to True type "Lucida Console", Then click OK to apply the attribute to the current window.
The above operation does not completely solve the problem, because the content displayed may not be complete. You can minimize and then maximize the command-line window, and the contents of the file are fully displayed.

--------------------------------------------------------------------------------------------------------------- -

Attached: chcp detailed

function Description
Displays the number of code pages for the active console, or changes the active console code page for the console. If used without parameters, CHCP displays the number of active console code pages.

Supplemental description  
only the original equipment manufacturer (OEM) code page that is installed with XOX can display correctly in a command prompt window that uses Raster fonts. Other code pages can be displayed correctly in full-screen mode or in a command prompt window that uses TrueType fonts. Just like in MS-DOS, you don't have to prepare code pages. Programs that start after the new code page is assigned will use the new code page, but if the program (except for Cmd.exe) is started before the new code page is assigned, the program will use the original code page.

Grammar
CHCP [NNN]

Parameters
NNN Specifies the code page. The following table lists all supported code pages for MSDOS and their country/region or language:
Code page Country (region) or language
437 USA
850 multilingual (Latin I)
852 Slavic language (Latin II)
855 Cyrillic (Russian)
857 Turkish
860 Portuguese
861 Icelandic
863 Canada-French
865 Germanic
866 Russian
869 Modern Greek
936 Simplified Chinese
950 Traditional Chinese
65001 UTF-8

/? Displays help at the command prompt.

Example
To view the active code page settings, type:

1 chcp

A message similar to the following appears:
Activity code page: 437

If you want to change the active code page to 850 (multi-language), type:

1 chcp 850

If the specified code page is not valid, the following error message is displayed:

Invalid code page

Change the CMD code page to correct the language display

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.