byte order mark

A Byte Order Mark (BOM) is a signature at the beginning of a Unicode data stream that may be used by a higher protocol. The signature can indicate whether a data stream is Unicode encoded or not, and if so, which Unicode Transformation Format (UTF) is used.
The BOM is U+FEFF ZERO WIDTH NON-BREAKING SPACE (ZWNBSP), which can be represented in different byte sequences depending on the UTF:

To encode a ZWNBSP as the first chracter in a data stream that also uses a BOM, simply start with U+FEFF U+FEFF.
While most (if not all) modern Microsoft applications use BOM, not all software do. For example, the API for Java 1.4 SE treats ZWNBSP like an ordinary character. Its Reader classes do not attempt to determine an InputStream's encoding by looking for a BOM signature.