Is “EF BF BF” an allowed character in XML (UTF-8)?
问题 Is "EF BF BF" an allowed character in XML (UTF-8)? <?xml version="1.0" encoding="UTF-8" ?> <XML> <DOCUMENT> <CONTENT>" "</CONTENT> </DOCUMENT> </XML> 回答1: If "EF BF BF" is a typo, and you meant "EF BB BF": Yes, if it is the first bytes. They are the "BOM", Byte Order Mark, used to identify the endianness of the file. For UTF-16 and UTF-32-encoded files this is mandatory. For UTF-8, this is optional. Some systems might be confused by it if it is present, and it might give unexpected behavior