且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

utf-8 和 utf-8-sig 有什么区别?

更新时间:2023-11-27 19:19:40

"sig"在utf-8-sig"中是signature"的缩写(即签名 utf-8 文件).使用 utf-8-sig 读取文件会将 BOM 视为文件信息.而不是字符串.

"sig" in "utf-8-sig" is the abbreviation of "signature" (i.e. signature utf-8 file). Using utf-8-sig to read a file will treat BOM as file info. instead of a string.