Modify cmd encoding format

chcp command,

chcp 65001 is to change to UTF-8 code page

chcp 936 can be changed back to the default GBK

chcp 437 is

the Chinese character in the UTF8 encoded file that is normally displayed in the console window of cmd.exe in American English (type command)?

First switch the active code page chcp 65001 (65001 is the code page of UTF-8 in Windows);

then enter the window properties to modify the font that can display Chinese. Operation: "Properties" -> "Font", change the font to True Type font "Lucida Console", then click [OK], and select to apply the properties to the current window.

At this time, type can display Chinese characters in UTF-8 encoded files, but cannot display Chinese characters in GBK encoded files.

If you need to support GBK again, you must execute chcp 936 to switch back to the Simplified Chinese code page.

Under the 65001 code page:

sometimes the display of Chinese is incomplete, you can minimize and then maximize the cmd window; the

dir command can still display the Chinese file name correctly;

cannot switch to the Chinese input method; you can only copy and paste Chinese from other places. But after pasting, the cursor display will be misplaced.

In addition, I also roughly understand the meaning of the code page, which should refer to the character encoding used by the IO subsystem in this cmd window.
Transfer: http://ldgliguang.blog.163.com/blog/static/818458201303111452568/

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327070772&siteId=291194637