Unicode: Byte Order (Endianness)

By Xah Lee. Date: . Last updated: .

What is Byte Order

Byte Order (aka Endianness. big-endian vs little-endian) indicates the order of byte unit, used in file or Binary transmission.

Byte Order Explained

Best explained by an example. The character ๐Ÿคก

In UTF-16 Encoding, it has 4 bytes: D8 3E DD 21 (Each 2 hexadecimals is one byte (one byte is 8 binary digits))

In UTF-16, the minimal number of bytes for a character is 2 bytes. So, it groups every 2-byte as one single unit, called code unit.

Origin of the jargon Big-Endian, Little-Endian

The term Big-Endian vs Little-Endian for byte-order came from a april fools joke ON HOLY WARS AND A PLEA FOR PEACE written by Danny Cohen, published in .

it alludes to Jonathan Swift's 1726 satire Gulliver's Travels. PART I โ€” A VOYAGE TO LILLIPUT, where the people of Lilliput and Blefuscu fight about which end of egg to crack first.

Unicode and Encoding Explained