Using PYTHon2 to execute Python scripts in Windows CMD
- Can first decode Chinese to Unicode, and then converted to GBK display normal, need to be added in the code to print Chinese
Print ('.decode('utf-8').encode(' GBK '))Copy the code
- Alternatively, you can change the default encoding mode for CMD
CHCP 65001 changed to UTF-8 code page CHCP 936 changed back to GBK defaultCopy the code