A setting code by the command cmd
Performing a chcp open cmd cmd can be obtained as shown in the current encoding:
Gbk 936 corresponding to the digital code. chcp + coded numeric codes, can be arranged cmd code corresponding coding. For example chcp 65001 (provided utf-8 encoded)
Second, the function provided using cmd encoding SetConsoleCP
This approach needs to be achieved in the cmd process. ,
Function prototype: Bool SetConsoleCp (UINT wCodePageID )