Window notepad, edited txt file, why is it garbled when transmitted to github, and not garbled after mac cloning?

Mar.09,2021

text files are not encoded in utf-8 format by default. You can use nodepadePP to modify the encoding format of text to utf-8 and then upload it to github.


character encoding. Modify it to UTF-8


system notepad encoding is ANSI,. You can refer to the following article to change the coding to UTF-8
https://blog.csdn.net/shenqua.
or edit it directly with an editor. The common ones are sublimetext (highly recommended). NotepadPP et al
a href= "https://www.sublimetext.com/3" rel=" nofollow noreferrer "> https://www.sublimetext.com/3
https://www.sublimetext.com/3dev


Don't use Windows notepad to edit any code

because it will add a BOM header (special character, invisible) to the file header after it is saved, which will result in a file decoding error (because it is usually saved as UTF-8 without BOM). If you use a text editor with the ability to adjust the encoding, you should also see the options "UTF-8/UTF-8 without BOM" and "UTF-8 with BOM".

as to why there is a BOM, you can understand that it is a tag set to identify different coding standards (otherwise you will have to read the entire file to determine the encoding it uses), just don't touch it in the programming field. As for notepad, you can either install a substitute without BOM injection (such as NotepadPP), or just open it with notepad without saving it.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e518b6-43df8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e518b6-43df8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?