This problem may occur when you use Notepad or the like to save files under Windows. Notepad automatically inserts three invisible bytes 0xEF 0xBB 0xBF, generally called the BOM header.
You can output these three bytes as hexadecimal or decimal to see if they are these three numbers
If you are
windows
平台开发,建议使用nodepad++
,并选择以UTF-8无BOM格式编码
may be invisible characters
Try saving the file as utf-8 format
Is there a BOM head
This problem may occur when you use Notepad or the like to save files under Windows. Notepad automatically inserts three invisible bytes 0xEF 0xBB 0xBF, generally called the BOM header.
You can output these three bytes as hexadecimal or decimal to see if they are these three numbers