Lines Matching refs:UnicodeScalarValue
580 static void encodeUTF8( uint32_t UnicodeScalarValue in encodeUTF8() argument
582 if (UnicodeScalarValue <= 0x7F) { in encodeUTF8()
583 Result.push_back(UnicodeScalarValue & 0x7F); in encodeUTF8()
584 } else if (UnicodeScalarValue <= 0x7FF) { in encodeUTF8()
585 uint8_t FirstByte = 0xC0 | ((UnicodeScalarValue & 0x7C0) >> 6); in encodeUTF8()
586 uint8_t SecondByte = 0x80 | (UnicodeScalarValue & 0x3F); in encodeUTF8()
589 } else if (UnicodeScalarValue <= 0xFFFF) { in encodeUTF8()
590 uint8_t FirstByte = 0xE0 | ((UnicodeScalarValue & 0xF000) >> 12); in encodeUTF8()
591 uint8_t SecondByte = 0x80 | ((UnicodeScalarValue & 0xFC0) >> 6); in encodeUTF8()
592 uint8_t ThirdByte = 0x80 | (UnicodeScalarValue & 0x3F); in encodeUTF8()
596 } else if (UnicodeScalarValue <= 0x10FFFF) { in encodeUTF8()
597 uint8_t FirstByte = 0xF0 | ((UnicodeScalarValue & 0x1F0000) >> 18); in encodeUTF8()
598 uint8_t SecondByte = 0x80 | ((UnicodeScalarValue & 0x3F000) >> 12); in encodeUTF8()
599 uint8_t ThirdByte = 0x80 | ((UnicodeScalarValue & 0xFC0) >> 6); in encodeUTF8()
600 uint8_t FourthByte = 0x80 | (UnicodeScalarValue & 0x3F); in encodeUTF8()
734 UTF8Decoded UnicodeScalarValue in escape() local
736 if (UnicodeScalarValue.second == 0) { in escape()
744 if (UnicodeScalarValue.first == 0x85) in escape()
746 else if (UnicodeScalarValue.first == 0xA0) in escape()
748 else if (UnicodeScalarValue.first == 0x2028) in escape()
750 else if (UnicodeScalarValue.first == 0x2029) in escape()
753 sys::unicode::isPrintable(UnicodeScalarValue.first)) in escape()
754 EscapedInput += StringRef(i, UnicodeScalarValue.second); in escape()
756 std::string HexStr = utohexstr(UnicodeScalarValue.first); in escape()
764 i += UnicodeScalarValue.second - 1; in escape()
2197 unsigned int UnicodeScalarValue; in getDoubleQuotedValue() local
2198 if (UnquotedValue.substr(1, 2).getAsInteger(16, UnicodeScalarValue)) in getDoubleQuotedValue()
2200 UnicodeScalarValue = 0xFFFD; in getDoubleQuotedValue()
2201 encodeUTF8(UnicodeScalarValue, Storage); in getDoubleQuotedValue()
2208 unsigned int UnicodeScalarValue; in getDoubleQuotedValue() local
2209 if (UnquotedValue.substr(1, 4).getAsInteger(16, UnicodeScalarValue)) in getDoubleQuotedValue()
2211 UnicodeScalarValue = 0xFFFD; in getDoubleQuotedValue()
2212 encodeUTF8(UnicodeScalarValue, Storage); in getDoubleQuotedValue()
2219 unsigned int UnicodeScalarValue; in getDoubleQuotedValue() local
2220 if (UnquotedValue.substr(1, 8).getAsInteger(16, UnicodeScalarValue)) in getDoubleQuotedValue()
2222 UnicodeScalarValue = 0xFFFD; in getDoubleQuotedValue()
2223 encodeUTF8(UnicodeScalarValue, Storage); in getDoubleQuotedValue()