What is a BOM?
The special characteristics of U+FEFF ZERO WIDTH NON-BREAKING SPACE have been provided for use by higher level protocols as a signature at the beginning of certain data streams (primarily unmarked plaintext files). (When used as a signature, it is referred to as the BOM character, for Byte Order Mark.) Under those protocols, the BOM may be mandatory in those Unicode data streams. In the absence of such protocols and when not at the beginning of a text stream, U+FEFF is given its normal interpretation, as ZERO WIDTH NON-BREAKING SPACE, and is part of the content of the file or string.
A byte order mark (BOM) consists of the character code U+FEFF at the beginning of a data stream, where it can be used as a signature defining the byte order and encoding form, primarily of unmarked plaintext files. Under some higher level protocols, use of a BOM may be mandatory (or prohibited) in the Unicode data stream defined in that protocol.