Ravi Vishwakarma is a dedicated Software Developer with a passion for crafting efficient and innovative solutions. With a keen eye for detail and years of experience, he excels in developing robust software systems that meet client needs. His expertise spans across multiple programming languages and technologies, making him a valuable asset in any software development project.
ICSM Computer
03-Jun-2025In .NET (and Unicode in general), high and low surrogate characters are used to represent Unicode code points that cannot be represented in a single 16-bit
char(i.e., characters beyond the Basic Multilingual Plane, BMP — those with code points aboveU+FFFF).Surrogate Pairs: What They Are
.NET uses UTF-16 encoding for strings. UTF-16 represents:
U+0000toU+FFFF(BMP) in a singlechar(16-bit).U+10000toU+10FFFFusing a pair ofcharvalues — one high surrogate and one low surrogate.This pair is called a surrogate pair.
High Surrogate
U+D800toU+DBFF55296to56319Low Surrogate
U+DC00toU+DFFF56320to57343Example
Consider the emoji 😁 (Unicode code point
U+1F601):In UTF-16, this is encoded as:
\uD83D\uDE01.NET API Methods Related to Surrogates
You can use these static methods from the
Charclass:Example:
Summary Table