internal static int GetNumberOfEncodedBytes(UnicodeCodePoint codePoint)
{
if (codePoint.Value <= 0x7F)
{
return 1;
}
if (codePoint.Value <= 0x7FF)
{
return 2;
}
if (codePoint.Value <= 0xFFFF)
{
return 3;
}
if (codePoint.Value <= 0x1FFFFF)
{
return 4;
}
return 0;
}