Lines Matching defs:UnicodeScalarValue
578 /// encodeUTF8 - Encode \a UnicodeScalarValue in UTF-8 and append it to result.
579 static void encodeUTF8( uint32_t UnicodeScalarValue
581 if (UnicodeScalarValue <= 0x7F) {
582 Result.push_back(UnicodeScalarValue & 0x7F);
583 } else if (UnicodeScalarValue <= 0x7FF) {
584 uint8_t FirstByte = 0xC0 | ((UnicodeScalarValue & 0x7C0) >> 6);
585 uint8_t SecondByte = 0x80 | (UnicodeScalarValue & 0x3F);
588 } else if (UnicodeScalarValue <= 0xFFFF) {
589 uint8_t FirstByte = 0xE0 | ((UnicodeScalarValue & 0xF000) >> 12);
590 uint8_t SecondByte = 0x80 | ((UnicodeScalarValue & 0xFC0) >> 6);
591 uint8_t ThirdByte = 0x80 | (UnicodeScalarValue & 0x3F);
595 } else if (UnicodeScalarValue <= 0x10FFFF) {
596 uint8_t FirstByte = 0xF0 | ((UnicodeScalarValue & 0x1F0000) >> 18);
597 uint8_t SecondByte = 0x80 | ((UnicodeScalarValue & 0x3F000) >> 12);
598 uint8_t ThirdByte = 0x80 | ((UnicodeScalarValue & 0xFC0) >> 6);
599 uint8_t FourthByte = 0x80 | (UnicodeScalarValue & 0x3F);
733 UTF8Decoded UnicodeScalarValue
735 if (UnicodeScalarValue.second == 0) {
743 if (UnicodeScalarValue.first == 0x85)
745 else if (UnicodeScalarValue.first == 0xA0)
747 else if (UnicodeScalarValue.first == 0x2028)
749 else if (UnicodeScalarValue.first == 0x2029)
752 sys::unicode::isPrintable(UnicodeScalarValue.first))
753 EscapedInput += StringRef(i, UnicodeScalarValue.second);
755 std::string HexStr = utohexstr(UnicodeScalarValue.first);
763 i += UnicodeScalarValue.second - 1;
2196 unsigned int UnicodeScalarValue;
2197 if (UnquotedValue.substr(1, 2).getAsInteger(16, UnicodeScalarValue))
2199 UnicodeScalarValue = 0xFFFD;
2200 encodeUTF8(UnicodeScalarValue, Storage);
2207 unsigned int UnicodeScalarValue;
2208 if (UnquotedValue.substr(1, 4).getAsInteger(16, UnicodeScalarValue))
2210 UnicodeScalarValue = 0xFFFD;
2211 encodeUTF8(UnicodeScalarValue, Storage);
2218 unsigned int UnicodeScalarValue;
2219 if (UnquotedValue.substr(1, 8).getAsInteger(16, UnicodeScalarValue))
2221 UnicodeScalarValue = 0xFFFD;
2222 encodeUTF8(UnicodeScalarValue, Storage);