Lines Matching refs:utf8_char
23 size_t EncodeUTF8Char(char *buffer, char32_t utf8_char) { in EncodeUTF8Char() argument
24 if (utf8_char <= 0x7F) { in EncodeUTF8Char()
25 *buffer = static_cast<char>(utf8_char); in EncodeUTF8Char()
27 } else if (utf8_char <= 0x7FF) { in EncodeUTF8Char()
28 buffer[1] = 0x80 | (utf8_char & 0x3F); in EncodeUTF8Char()
29 utf8_char >>= 6; in EncodeUTF8Char()
30 buffer[0] = 0xC0 | utf8_char; in EncodeUTF8Char()
32 } else if (utf8_char <= 0xFFFF) { in EncodeUTF8Char()
33 buffer[2] = 0x80 | (utf8_char & 0x3F); in EncodeUTF8Char()
34 utf8_char >>= 6; in EncodeUTF8Char()
35 buffer[1] = 0x80 | (utf8_char & 0x3F); in EncodeUTF8Char()
36 utf8_char >>= 6; in EncodeUTF8Char()
37 buffer[0] = 0xE0 | utf8_char; in EncodeUTF8Char()
40 buffer[3] = 0x80 | (utf8_char & 0x3F); in EncodeUTF8Char()
41 utf8_char >>= 6; in EncodeUTF8Char()
42 buffer[2] = 0x80 | (utf8_char & 0x3F); in EncodeUTF8Char()
43 utf8_char >>= 6; in EncodeUTF8Char()
44 buffer[1] = 0x80 | (utf8_char & 0x3F); in EncodeUTF8Char()
45 utf8_char >>= 6; in EncodeUTF8Char()
46 buffer[0] = 0xF0 | utf8_char; in EncodeUTF8Char()