1234567891011121314151617 |
rem 英文 chcp 437 rem 日文 chcp 932 rem 简体中文 chcp 936 rem 韩文 chcp 949 rem 繁体中文 chcp 950 rem utf-8 chcp 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:
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:
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