The byte order mark (BOM) is a Unicode character used to signal the endianness (byte order) of a text file or stream. It is encoded at U+FEFF byte order mark (BOM). BOM use is optional, and, if used, should appear at the start of the text stream. Beyond its specific use as a byte-order indicator, the BOM character may also indicate which of the several Unicode representations the text is encoded in.
Because Unicode can be encoded as 16-bit or 32-bit integers, a computer receiving these encodings from arbitrary sources needs to know which byte order the integers are encoded in. The BOM gives the producer of the text a way to describe the text stream's endianness to the consumer of the text without requiring some contract or metadata outside of the text stream itself. Once the receiving computer has consumed the text stream, it presumably processes the characters in its own native byte order and no longer needs the BOM. Hence the need for a BOM arises in the context of text interchange, rather than in normal text processing within a closed environment.
Read more about Byte Order Mark: Usage, Representations of Byte Order Marks By Encoding
Famous quotes containing the words order and/or mark:
“The herd of mankind can hardly be said to think; their notions are almost all adoptive; and, in general, I believe it is better that it should be so; as such common prejudices contribute more to order and quiet, than their own separate reasonings would do, uncultivated and unimproved as they are.”
—Philip Dormer Stanhope, 4th Earl Chesterfield (16941773)
“It is the mark of a great man that he puts to flight all ordinary calculations. He is at once sublime and touching, childlike and of the race of giants.”
—HonorĂ© De Balzac (17991850)