Lines Matching defs:UnicodeScalarValue

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