public unsafe Utf8EncodedCodePoint(char highSurrogate, char lowSurrogate) : this()
{
UnicodeCodePoint codePoint = (UnicodeCodePoint)(uint)char.ConvertToUtf32(highSurrogate, lowSurrogate);
fixed(byte *encodedData = &_byte0)
{
Span <byte> buffer = new Span <byte>(encodedData, 4);
if (!Utf8Encoder.TryEncodeCodePoint(codePoint, buffer, out _length))
{
// TODO: Change exception type
throw new Exception("Internal error: this should never happen as codePoint should be within acceptable range");
}
}
}