BOM (byte order mark)

> (Data|State) Management and Processing > (Data Type|Data Structure) > (Text|String|Character)

1 - About

The byte order mark (BOM) is a magic number (header) (Unicode character, U+FEFF'' BYTE ORDER MARK (BOM)

It is not a character, but a byte sequence at the beginning of the file.

It can be found at the start of a text file and indicates

  • The byte order, or endianness, of the text file
  • The fact that the text stream's encoding is Unicode, to a high level of confidence;
  • Which Unicode encoding the text stream is encoded as.

3 - Library

If you pass a character set to a file reader, you don't need to handle the BOM.

4 - Documentation / Reference