Lines Matching refs:UnicodeScalarValue
573 static void encodeUTF8( uint32_t UnicodeScalarValue in encodeUTF8() argument
575 if (UnicodeScalarValue <= 0x7F) { in encodeUTF8()
576 Result.push_back(UnicodeScalarValue & 0x7F); in encodeUTF8()
577 } else if (UnicodeScalarValue <= 0x7FF) { in encodeUTF8()
578 uint8_t FirstByte = 0xC0 | ((UnicodeScalarValue & 0x7C0) >> 6); in encodeUTF8()
579 uint8_t SecondByte = 0x80 | (UnicodeScalarValue & 0x3F); in encodeUTF8()
582 } else if (UnicodeScalarValue <= 0xFFFF) { in encodeUTF8()
583 uint8_t FirstByte = 0xE0 | ((UnicodeScalarValue & 0xF000) >> 12); in encodeUTF8()
584 uint8_t SecondByte = 0x80 | ((UnicodeScalarValue & 0xFC0) >> 6); in encodeUTF8()
585 uint8_t ThirdByte = 0x80 | (UnicodeScalarValue & 0x3F); in encodeUTF8()
589 } else if (UnicodeScalarValue <= 0x10FFFF) { in encodeUTF8()
590 uint8_t FirstByte = 0xF0 | ((UnicodeScalarValue & 0x1F0000) >> 18); in encodeUTF8()
591 uint8_t SecondByte = 0x80 | ((UnicodeScalarValue & 0x3F000) >> 12); in encodeUTF8()
592 uint8_t ThirdByte = 0x80 | ((UnicodeScalarValue & 0xFC0) >> 6); in encodeUTF8()
593 uint8_t FourthByte = 0x80 | (UnicodeScalarValue & 0x3F); in encodeUTF8()
727 UTF8Decoded UnicodeScalarValue in escape() local
729 if (UnicodeScalarValue.second == 0) { in escape()
737 if (UnicodeScalarValue.first == 0x85) in escape()
739 else if (UnicodeScalarValue.first == 0xA0) in escape()
741 else if (UnicodeScalarValue.first == 0x2028) in escape()
743 else if (UnicodeScalarValue.first == 0x2029) in escape()
746 std::string HexStr = utohexstr(UnicodeScalarValue.first); in escape()
754 i += UnicodeScalarValue.second - 1; in escape()
2022 unsigned int UnicodeScalarValue; in unescapeDoubleQuoted() local
2023 if (UnquotedValue.substr(1, 2).getAsInteger(16, UnicodeScalarValue)) in unescapeDoubleQuoted()
2025 UnicodeScalarValue = 0xFFFD; in unescapeDoubleQuoted()
2026 encodeUTF8(UnicodeScalarValue, Storage); in unescapeDoubleQuoted()
2034 unsigned int UnicodeScalarValue; in unescapeDoubleQuoted() local
2035 if (UnquotedValue.substr(1, 4).getAsInteger(16, UnicodeScalarValue)) in unescapeDoubleQuoted()
2037 UnicodeScalarValue = 0xFFFD; in unescapeDoubleQuoted()
2038 encodeUTF8(UnicodeScalarValue, Storage); in unescapeDoubleQuoted()
2046 unsigned int UnicodeScalarValue; in unescapeDoubleQuoted() local
2047 if (UnquotedValue.substr(1, 8).getAsInteger(16, UnicodeScalarValue)) in unescapeDoubleQuoted()
2049 UnicodeScalarValue = 0xFFFD; in unescapeDoubleQuoted()
2050 encodeUTF8(UnicodeScalarValue, Storage); in unescapeDoubleQuoted()