Problem with BOM Header
The problem occurs when JAXB transforms an XML file into a Java object, and a modified XML file with UE is added to the BOM header, resulting in problems with parsing. However, log4j parsing an XML file with a BOM header will not be problematic.
What is a BOM header?
In the Utf-8 encoded file, the BOM is in the file header, occupies three bytes, which is used to indicate that the file belongs to Utf-8 encoding.
Now there are many software to identify the BOM header, but also some do not recognize the BOM header, such as PHP does not recognize the BOM header, which is the use of Notepad editing Utf-8 code execution will be the cause of the error.
The way to get rid of BOM head, simple is the following two kinds:
1, EditPlus to the BOM head method
After the editor is resized to UTF8 encoded format, the saved file will be preceded by a string of hidden characters (also known as BOMs), used by the editor to identify whether the file is encoded in UTF8.
Run EditPlus, click Tools, select Preferences, select File, UTF-8 identity Select Always delete signature,
2, UltraEdit removal of BOM head method
After opening the file, Save As option in the encoding format selected (Utf-8 without BOM header), OK.
The BOM is only available when the "notepad" store is stored as UTF-8 in Windows, which can be deleted with the Winhex of the first 2 bytes.
Problem with BOM Header