chcp usage and analysis

Win+R-->Enter cmd command line

chcp 
displays the number of active console code pages, or changes the active console code page for that console. If used without arguments, chcp displays the number of active console code pages. 
The syntax 
chcp [nnn] 
parameter 
specifies the code page. The following table lists all supported code pages and their countries or languages: 
Code Page Country 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 (Shift-JIS)
936 Chinese-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 Language (Windows)
1256 Arabic (Windows)
1257 Baltic (Windows)
1258 Vietnamese (Windows) 20866 Cyrillic
(KOI8-R)
21866 Cyrillic (KOI8-U)
28592 Central European (ISO)
28593 Latin3 ( ISO)
28594 Baltic (ISO)
28595 Cyrillic (ISO)
28596 Arabic (ISO)
28597 Greek (ISO)
28598 Hebrew (ISO-Visual)
38598 Hebrew (ISO-Logical)
50000 User Defined
50001 Auto Select
50220 Japanese (JIS) 50221 Japanese (JIS
-allows one-byte katakana)
50222 Japanese (JIS-allows one-byte katakana- SO/ SI)
50225 Korean (ISO)
50932 Japanese (auto-select)
50949 Korean (auto-select)
51932 Japanese (EUC)
51949 Korean (EUC)
52936 Simplified Chinese (HZ)

65001 Unicode (UTF-8)


/? 
Displays help at the command prompt. 
Note 
Only original equipment manufacturer (OEM) code pages installed with Windows XP will display correctly in command prompt windows that use raster fonts. Other code pages display correctly in full screen mode or in command prompt windows using TrueType fonts. 
As in MS-DOS, you don't have to prepare the code page. 
Starting a program that is assigned a new code page will use the new code page, but if the new code page is assigned after the program (except Cmd.exe) is started, the program will use the old code page. 
Example 
To view the active code page settings, type: 
chcp 
The following message appears: 
Active code page: 437 
To change the active code page to 850 (multilingual), type: 
chcp 850 
If the specified code page is invalid, The following error message is displayed: 
Invalid code page

 

Purpose: Sometimes some software that is not verified by Microsoft is installed and the code page is restored to 437. You see that Chinese cannot be displayed in the cmd window. At this time, you can use

The chcp 936  command changes the code page to Chinese simplified, so that you can see Chinese


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324768737&siteId=291194637