Table of Contents

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.

Library

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

Documentation / Reference