SurrogatePaare
SurrogatePaare, commonly called surrogate pairs, are a mechanism used in UTF-16 encoding to represent code points outside the Basic Multilingual Plane (BMP), i.e., code points from U+10000 to U+10FFFF. In UTF-16, such a code point is encoded as two 16‑bit code units: a high surrogate and a low surrogate. The high surrogate range is 0xD800 to 0xDBFF, and the low surrogate range is 0xDC00 to 0xDFFF. The numeric value of a surrogate pair is computed as U = ((H - 0xD800) << 10) + (L - 0xDC00) + 0x10000, where H and L are the high and low surrogate values.
Example: U+1F600 (GRINNING FACE) is encoded as the pair 0xD83D 0xDE00. In memory this pairing may appear
Endianness and well-formedness are important: the two code units form a single character only when used together
Usage and implications: many programming languages expose strings as sequences of code units or code points,
See also: Unicode, UTF-16, surrogate half, supplementary plane, code point, UTF-8.