Lines Matching refs:ucs

64 std::size_t EncodeUTF8(char *p0, char32_t ucs) {  in EncodeUTF8()  argument
66 if (ucs <= 0x7f) { in EncodeUTF8()
67 p[0] = ucs; in EncodeUTF8()
69 } else if (ucs <= 0x7ff) { in EncodeUTF8()
70 p[0] = 0xc0 | (ucs >> 6); in EncodeUTF8()
71 p[1] = 0x80 | (ucs & 0x3f); in EncodeUTF8()
73 } else if (ucs <= 0xffff) { in EncodeUTF8()
74 p[0] = 0xe0 | (ucs >> 12); in EncodeUTF8()
75 p[1] = 0x80 | ((ucs >> 6) & 0x3f); in EncodeUTF8()
76 p[2] = 0x80 | (ucs & 0x3f); in EncodeUTF8()
78 } else if (ucs <= 0x1fffff) { in EncodeUTF8()
79 p[0] = 0xf0 | (ucs >> 18); in EncodeUTF8()
80 p[1] = 0x80 | ((ucs >> 12) & 0x3f); in EncodeUTF8()
81 p[2] = 0x80 | ((ucs >> 6) & 0x3f); in EncodeUTF8()
82 p[3] = 0x80 | (ucs & 0x3f); in EncodeUTF8()
84 } else if (ucs <= 0x3ffffff) { in EncodeUTF8()
85 p[0] = 0xf8 | (ucs >> 24); in EncodeUTF8()
86 p[1] = 0x80 | ((ucs >> 18) & 0x3f); in EncodeUTF8()
87 p[2] = 0x80 | ((ucs >> 12) & 0x3f); in EncodeUTF8()
88 p[3] = 0x80 | ((ucs >> 6) & 0x3f); in EncodeUTF8()
89 p[4] = 0x80 | (ucs & 0x3f); in EncodeUTF8()
91 } else if (ucs <= 0x7ffffff) { in EncodeUTF8()
92 p[0] = 0xf8 | (ucs >> 30); in EncodeUTF8()
93 p[1] = 0x80 | ((ucs >> 24) & 0x3f); in EncodeUTF8()
94 p[2] = 0x80 | ((ucs >> 18) & 0x3f); in EncodeUTF8()
95 p[3] = 0x80 | ((ucs >> 12) & 0x3f); in EncodeUTF8()
96 p[4] = 0x80 | ((ucs >> 6) & 0x3f); in EncodeUTF8()
97 p[5] = 0x80 | (ucs & 0x3f); in EncodeUTF8()
101 p[1] = 0x80 | ((ucs >> 30) & 0x3f); in EncodeUTF8()
102 p[2] = 0x80 | ((ucs >> 24) & 0x3f); in EncodeUTF8()
103 p[3] = 0x80 | ((ucs >> 18) & 0x3f); in EncodeUTF8()
104 p[4] = 0x80 | ((ucs >> 12) & 0x3f); in EncodeUTF8()
105 p[5] = 0x80 | ((ucs >> 6) & 0x3f); in EncodeUTF8()
106 p[6] = 0x80 | (ucs & 0x3f); in EncodeUTF8()