Lines Matching refs:UnicodeScalarValue
520 static void encodeUTF8( uint32_t UnicodeScalarValue in encodeUTF8() argument
522 if (UnicodeScalarValue <= 0x7F) { in encodeUTF8()
523 Result.push_back(UnicodeScalarValue & 0x7F); in encodeUTF8()
524 } else if (UnicodeScalarValue <= 0x7FF) { in encodeUTF8()
525 uint8_t FirstByte = 0xC0 | ((UnicodeScalarValue & 0x7C0) >> 6); in encodeUTF8()
526 uint8_t SecondByte = 0x80 | (UnicodeScalarValue & 0x3F); in encodeUTF8()
529 } else if (UnicodeScalarValue <= 0xFFFF) { in encodeUTF8()
530 uint8_t FirstByte = 0xE0 | ((UnicodeScalarValue & 0xF000) >> 12); in encodeUTF8()
531 uint8_t SecondByte = 0x80 | ((UnicodeScalarValue & 0xFC0) >> 6); in encodeUTF8()
532 uint8_t ThirdByte = 0x80 | (UnicodeScalarValue & 0x3F); in encodeUTF8()
536 } else if (UnicodeScalarValue <= 0x10FFFF) { in encodeUTF8()
537 uint8_t FirstByte = 0xF0 | ((UnicodeScalarValue & 0x1F0000) >> 18); in encodeUTF8()
538 uint8_t SecondByte = 0x80 | ((UnicodeScalarValue & 0x3F000) >> 12); in encodeUTF8()
539 uint8_t ThirdByte = 0x80 | ((UnicodeScalarValue & 0xFC0) >> 6); in encodeUTF8()
540 uint8_t FourthByte = 0x80 | (UnicodeScalarValue & 0x3F); in encodeUTF8()
671 UTF8Decoded UnicodeScalarValue in escape() local
673 if (UnicodeScalarValue.second == 0) { in escape()
681 if (UnicodeScalarValue.first == 0x85) in escape()
683 else if (UnicodeScalarValue.first == 0xA0) in escape()
685 else if (UnicodeScalarValue.first == 0x2028) in escape()
687 else if (UnicodeScalarValue.first == 0x2029) in escape()
690 std::string HexStr = utohexstr(UnicodeScalarValue.first); in escape()
698 i += UnicodeScalarValue.second - 1; in escape()
1771 unsigned int UnicodeScalarValue; in unescapeDoubleQuoted() local
1772 if (UnquotedValue.substr(1, 2).getAsInteger(16, UnicodeScalarValue)) in unescapeDoubleQuoted()
1774 UnicodeScalarValue = 0xFFFD; in unescapeDoubleQuoted()
1775 encodeUTF8(UnicodeScalarValue, Storage); in unescapeDoubleQuoted()
1783 unsigned int UnicodeScalarValue; in unescapeDoubleQuoted() local
1784 if (UnquotedValue.substr(1, 4).getAsInteger(16, UnicodeScalarValue)) in unescapeDoubleQuoted()
1786 UnicodeScalarValue = 0xFFFD; in unescapeDoubleQuoted()
1787 encodeUTF8(UnicodeScalarValue, Storage); in unescapeDoubleQuoted()
1795 unsigned int UnicodeScalarValue; in unescapeDoubleQuoted() local
1796 if (UnquotedValue.substr(1, 8).getAsInteger(16, UnicodeScalarValue)) in unescapeDoubleQuoted()
1798 UnicodeScalarValue = 0xFFFD; in unescapeDoubleQuoted()
1799 encodeUTF8(UnicodeScalarValue, Storage); in unescapeDoubleQuoted()