That is, there is a BOM format code, or no BOM format coding.
If you look at the contents of a document and you do not see any difference, take the following document (Schema.sqlite.sql) as an example:
Schema.sqlite.sql
Copy Code code as follows:
CREATE TABLE Guestbook (
ID INTEGER not NULL PRIMARY KEY AutoIncrement,
Email VARCHAR not NULL DEFAULT ' noemail@test.com ',
Comment TEXT NULL,
Created DATETIME not NULL
);
CREATE INDEX "id" on "Guestbook" ("id");
If you do not have a signature, the file size is 232 bytes, and if signed, the file size is 235 bytes.
The UTF8 signature has 3 bytes (content: EFBBBF), which is specifically used to tell the software that the file is UTF8 encoded.
In general, the presence or absence of a signature does not cause problems because the editor or other software can infer whether it is UTF8 according to the contents of the text.
But sometimes it can lead to problems, such as appeal documents. The file is an SQL statement file that the program will execute precisely through the following statement (PHP):
Copy Code code as follows:
$SCHEMASQL = file_get_contents (dirname (__file__). '/schema.sqlite.sql ');
$dbAdapter->getconnection ()->exec ($SCHEMASQL);
In this case, a signed file can cause problems because the "three bytes of UTF8 signature" is actually at the front of the file. As a result, the above statement cannot run successfully.
The solution is also very simple, remove the file UTF8 signature.
Of course, the contents of the above file are in fact single-byte, there is no need to save for UTF8 encoding.
Supplemental: All Single-byte content files are the default encoding of the system unless you add a UTF8 signature, or you open the file again.