A surrogate pair is the two-code unit representation used by UTF-16 for a Unicode scalar value above
U+FFFF. The high surrogate lies in D800–DBFF and the low surrogate in DC00–DFFF, written in hexadecimal. They encode one value together; neither surrogate alone is a Unicode scalar value.[ref]For numerical units , the decoded value isThus
D83D DE00 gives U+1F600. Swapping the units or discarding one half breaks that encoding. A string operation specified in code units must therefore account for pairs when it intends to preserve complete code points; a grapheme cluster can require still more units. New to topics? Read the docs here!