Home
last modified time | relevance | path

Searched refs:wc1 (Results 1 – 2 of 2) sorted by relevance

/external/toybox/toys/example/
Ddemo_utf8towc.c23 wchar_t wc1, wc2; in demo_utf8towc_main() local
31 wc1 = wc2 = 0; in demo_utf8towc_main()
36 len1 = mbrtowc(&wc1, str, len2, &mb); in demo_utf8towc_main()
39 if (len1 != len2 || wc1 != wc2) in demo_utf8towc_main()
40 printf("%x %d %x %d %x\n", u, len1, wc1, len2, wc2); in demo_utf8towc_main()
/external/libcxx/src/
Dlocale.cpp1753 uint16_t wc1 = *frm_nxt; in utf16_to_utf8() local
1754 if (wc1 > Maxcode) in utf16_to_utf8()
1756 if (wc1 < 0x0080) in utf16_to_utf8()
1760 *to_nxt++ = static_cast<uint8_t>(wc1); in utf16_to_utf8()
1762 else if (wc1 < 0x0800) in utf16_to_utf8()
1766 *to_nxt++ = static_cast<uint8_t>(0xC0 | (wc1 >> 6)); in utf16_to_utf8()
1767 *to_nxt++ = static_cast<uint8_t>(0x80 | (wc1 & 0x03F)); in utf16_to_utf8()
1769 else if (wc1 < 0xD800) in utf16_to_utf8()
1773 *to_nxt++ = static_cast<uint8_t>(0xE0 | (wc1 >> 12)); in utf16_to_utf8()
1774 *to_nxt++ = static_cast<uint8_t>(0x80 | ((wc1 & 0x0FC0) >> 6)); in utf16_to_utf8()
[all …]