Windows: Conversion cmd window's default character encoding

 Sometimes cmd execute the command window, the window of Chinese will be garbled, can be used to encode chcp command temporarily converted cmd window. Such as the use chcp 65001 can be converted to the default encoding of the current window to UTF-8 format.

chcp
shows the number of active console code page, or change the active console code page of the console. If used without parameters, the number of active console code page chcp display.
Syntax
chcp [nnn]
parameter
specifies the code page. The following table lists all supported code pages and their country (region) or language:
the code page country (region) or language
437 US
708 Arabic (ASMO 708)
720 Arabic (DOS)
850 multilingual (Latin I)
852 Central European (DOS) - Slavic (Latin II)
855 Cyrillic (Russian)
857 Turkish
860 Portuguese
861 Icelandic
862 Hebrew (DOS)
863 Canada - French
865 Germanic
866 Russian - Cyrillic (DOS)
869 modern Greek
874 Thai (Windows)
932 Japanese (the Shift-JIS)
936 China - Simplified Chinese (GB2312)
949 Korean
950 Traditional Chinese (Big5)
1200 Unicode       
1201 Unicode (Big-Endian)
1250 Central European (Windows)
1251 Cyrillic (Windows)
1252 Western European (Windows)
1253 Greek (Windows)
1254 Turkish (Windows)
1255 Hebrew Wen (Windows)
1256 Arabic (Windows)
1257 Baltic (Windows)
1258 Vietnamese (Windows)
20866 Cyrillic (KOI8-R)
21866 Cyrillic (KOI8-U)
28592 Central European (ISO)
28593 Latin 3 ( ISO)
28594 Baltic (ISO)
28595 Cyrillic (ISO)
28596 Arabic (ISO)
28597 Greek (ISO)
28598 Hebrew (ISO-Visual)
Hebrew 38598 (the Logical-the ISO)
50000 user-defined
50001 automatic selection
50220 Japanese (to JIS)
50221 Japanese (JIS-byte katakana allowed)
50222 Japanese (JIS-byte katakana allow a - SO / the SI)
50225 Korean (the ISO)
50932 Japanese (automatic selection)
50,949 Korean (automatic selection)
51932 Japanese (the EUC)
51949 Korean (the EUC)
52 936 Simplified Chinese (HZ)
65000 the Unicode (UTF-. 7)
65001 the Unicode (UTF-. 8)


/?
Displays help at the command prompt.
Notes
only with Windows XP installed with the original equipment manufacturer (OEM) code page to be displayed correctly in the command prompt window raster fonts. Other code page at a command prompt, or you can use TrueType fonts in full-screen mode, the window display correctly.
As in MS-DOS, you do not need to prepare code pages.
Start assign a new code page of the program will use the new code page, but if it is in the program (except Cmd.exe) after the start before assigning a new code page, the program will use the original code page.
Examples
To view the active code page setting, type:
chcp
message will appear as shown below:
the Active code Page: 437
To change the active code page 850 (Multilingual), type:
chcp 850
if the specified code page is invalid, : The following error message appears
invalid code page

 

Uses: Sometimes the installation of some non-Microsoft software verification code page lead reduced to 437, you see the next cmd window can not display Chinese, this time you can use

chcp 936 command to change Chinese Simplified code page, so you can see the Chinese

 
 
See: https://www.cnblogs.com/chasewade/p/3369618.html
 
 

chcp
shows the number of active console code page, or change the active console code page of the console. If used without parameters, the number of active console code page chcp display.
Syntax
chcp [nnn]
parameter
specifies the code page. The following table lists all supported code pages and their country (region) or language:
the code page country (region) or language
437 US
708 Arabic (ASMO 708)
720 Arabic (DOS)
850 multilingual (Latin I)
852 Central European (DOS) - Slavic (Latin II)
855 Cyrillic (Russian)
857 Turkish
860 Portuguese
861 Icelandic
862 Hebrew (DOS)
863 Canada - French
865 Germanic
866 Russian - Cyrillic (DOS)
869 modern Greek
874 Thai (Windows)
932 Japanese (the Shift-JIS)
936 China - Simplified Chinese (GB2312)
949 Korean
950 Traditional Chinese (Big5)
1200 Unicode       
1201 Unicode (Big-Endian)
1250 Central European (Windows)
1251 Cyrillic (Windows)
1252 Western European (Windows)
1253 Greek (Windows)
1254 Turkish (Windows)
1255 Hebrew Wen (Windows)
1256 Arabic (Windows)
1257 Baltic (Windows)
1258 Vietnamese (Windows)
20866 Cyrillic (KOI8-R)
21866 Cyrillic (KOI8-U)
28592 Central European (ISO)
28593 Latin 3 ( ISO)
28594 Baltic (ISO)
28595 Cyrillic (ISO)
28596 Arabic (ISO)
28597 Greek (ISO)
28598 Hebrew (ISO-Visual)
Hebrew 38598 (the Logical-the ISO)
50000 user-defined
50001 automatic selection
50220 Japanese (to JIS)
50221 Japanese (JIS-byte katakana allowed)
50222 Japanese (JIS-byte katakana allow a - SO / the SI)
50225 Korean (the ISO)
50932 Japanese (automatic selection)
50,949 Korean (automatic selection)
51932 Japanese (the EUC)
51949 Korean (the EUC)
52 936 Simplified Chinese (HZ)
65000 the Unicode (UTF-. 7)
65001 the Unicode (UTF-. 8)


/?
Displays help at the command prompt.
Notes
only with Windows XP installed with the original equipment manufacturer (OEM) code page to be displayed correctly in the command prompt window raster fonts. Other code page at a command prompt, or you can use TrueType fonts in full-screen mode, the window display correctly.
As in MS-DOS, you do not need to prepare code pages.
Start assign a new code page of the program will use the new code page, but if it is in the program (except Cmd.exe) after the start before assigning a new code page, the program will use the original code page.
Examples
To view the active code page setting, type:
chcp
message will appear as shown below:
the Active code Page: 437
To change the active code page 850 (Multilingual), type:
chcp 850
if the specified code page is invalid, : The following error message appears
invalid code page

 

Uses: Sometimes the installation of some non-Microsoft software verification code page lead reduced to 437, you see the next cmd window can not display Chinese, this time you can use

chcp 936 command to change Chinese Simplified code page, so you can see the Chinese

Guess you like

Origin www.cnblogs.com/yongdaimi/p/12519368.html