Search notes:

BOM

BOM is the abbreviation for Byte Order Mark.
BOM sounds like a bomb and tend to boom.
The BOM for UTF-8 is 0xEF 0xBB 0xBF and looks like .
For big endian UTF-16 is U+FEFF (ZERO WIDTH NO BREAK SPACE).
UTF-16 little endian: ff fe

Problems

A particular problem with BOMs is that when files (and sometimes even strings) are (quickly) concatenated, the BOM occurs in the middle of the resulting file.
Empty files (without text) are no longer empty (zero bytes).
Files that contain only the ASCII subset of UTF-8, don't have only ASCII characters anymore (the BOM is not ASCII). This might cause some tools to break
She-bangs (#!/bin/sh) not possible anymore.
VBScript script files with BOM don't seem to run anymore.
BOM is illegal in JSON.

See also

A BOM is illeagal in JSON (RFC 7159, Section 8.1)

Index