Posted by: FearTheBeard | Date: 03/08/2017 14:52 | IP: IP Logged
I'm not expert in programming, but I need help for solving this little issue.
I have two different xml file, I don't know why this two files are exactly equal and both start with the same Declaration, but the first one have a page code: UTF-8 and the second one have the page code: ANSI.
I try to check in HEX editor and it's clear... why this difference? and how is possible with the same declaration?
thanks a lot
Edited 1 time(s). Last edit at 03/08/2017 15:33 by pspad.
Posted by: pspad | Date: 03/08/2017 15:35 | IP: IP Logged
UTF-8 file contains BOM (begin order mark) on the begin of file.
UTF-8 encodes only chars with upper character table part. It means if you don't have characters with diacritic signs in your file, content of UTF-8 and ANSI will be same.
Posted by: Andreas | Date: 03/08/2017 16:14 | IP: IP Logged
BOM => "Byte order mark" en.wikipedia.org
In PHP e.g. you can not work with BOM files. There actually are so called "BOM checker classes" to examine files and make clear they have no BOM. You can not see the BOM when you open it with a text editor.
So if you work with PHP or not explicit need a BOM then always save your files without the BOM.
Edited 1 time(s). Last edit at 03/08/2017 16:15 by Andreas.