The encoding in CMD is ANSI and garbled if Chinese is not this encoding method. As a programmer, will often use the command window to view the execution log, but sometimes the encoding format is not correct, most of them are UTF8, in the online search for a lot of methods, a lot of useless, here to teach a specific method, you can change the Command window encoding mode to UTF8, then follow the steps to operate
The first step, open the command window cmd
The second step, modify the encoding method, input chcp 65001
The third step, the mouse in the command window in the title section of the right-click, in the Popup right-click menu above Select "Properties", in the new pop-up window select the "Font" tab, and then in the following font select "Lucida Console" This font, now try again, it should be no problem
Command Window modified code, CMD code modification method