Lines Matching refs:utf16
354 static void utf16_to_utf8(smart_str *buf, unsigned short utf16) in utf16_to_utf8() argument
356 if (utf16 < 0x80) in utf16_to_utf8()
358 smart_str_appendc(buf, (unsigned char) utf16); in utf16_to_utf8()
360 else if (utf16 < 0x800) in utf16_to_utf8()
362 smart_str_appendc(buf, 0xc0 | (utf16 >> 6)); in utf16_to_utf8()
363 smart_str_appendc(buf, 0x80 | (utf16 & 0x3f)); in utf16_to_utf8()
365 else if ((utf16 & 0xfc00) == 0xdc00 in utf16_to_utf8()
376 | (utf16 & 0x3ff)) + 0x10000; in utf16_to_utf8()
386 smart_str_appendc(buf, 0xe0 | (utf16 >> 12)); in utf16_to_utf8()
387 smart_str_appendc(buf, 0x80 | ((utf16 >> 6) & 0x3f)); in utf16_to_utf8()
388 smart_str_appendc(buf, 0x80 | (utf16 & 0x3f)); in utf16_to_utf8()
450 unsigned short utf16 = 0; in parse_JSON_ex() local
502 utf16 = dehexchar(next_char) << 12; in parse_JSON_ex()
504 utf16 += dehexchar(next_char) << 8; in parse_JSON_ex()
506 utf16 += dehexchar(next_char) << 4; in parse_JSON_ex()
508 utf16 += dehexchar(next_char); in parse_JSON_ex()
509 utf16_to_utf8(&buf, utf16); in parse_JSON_ex()