Lines Matching defs:char_value
178 // The char_value must have already been checked that it's a valid Unicode
181 inline void DoAppendUTF8(unsigned char_value, Output* output) {
182 if (char_value <= 0x7f) {
183 Appender(static_cast<unsigned char>(char_value), output);
184 } else if (char_value <= 0x7ff) {
186 Appender(static_cast<unsigned char>(0xC0 | (char_value >> 6)),
188 Appender(static_cast<unsigned char>(0x80 | (char_value & 0x3f)),
190 } else if (char_value <= 0xffff) {
192 Appender(static_cast<unsigned char>(0xe0 | (char_value >> 12)),
194 Appender(static_cast<unsigned char>(0x80 | ((char_value >> 6) & 0x3f)),
196 Appender(static_cast<unsigned char>(0x80 | (char_value & 0x3f)),
198 } else if (char_value <= 0x10FFFF) { // Max unicode code point.
200 Appender(static_cast<unsigned char>(0xf0 | (char_value >> 18)),
202 Appender(static_cast<unsigned char>(0x80 | ((char_value >> 12) & 0x3f)),
204 Appender(static_cast<unsigned char>(0x80 | ((char_value >> 6) & 0x3f)),
206 Appender(static_cast<unsigned char>(0x80 | (char_value & 0x3f)),
224 inline void AppendUTF8Value(unsigned char_value, CanonOutput* output) {
225 DoAppendUTF8<CanonOutput, AppendCharToOutput>(char_value, output);
232 inline void AppendUTF8EscapedValue(unsigned char_value, CanonOutput* output) {
233 DoAppendUTF8<CanonOutput, AppendEscapedChar>(char_value, output);
288 unsigned char_value;
289 bool success = ReadUTFChar(str, begin, length, &char_value);
290 AppendUTF8EscapedValue(char_value, output);