Copyright: please indicate the source https://blog.csdn.net/LI_AINY/article/details/90039391
- python written documents have been garbled, set the time to write utf-8 encoded
- Solution, add a BOM,
BOM (Byte Mark the Order), the byte order mark, the head appears in the text file, Unicode encoding standard used to identify which files are encoded using the format, but it is for readers who file is invisible characters. - Direct change encoded as utf-8-sig
then execute successfully!