Lines Matching refs:utf8
139 check_utf8_to_ucs4 (const char *utf8,
154 result = g_utf8_to_ucs4_fast (utf8, utf8_len, &items_written);
165 result = g_utf8_to_ucs4 (utf8, utf8_len, &items_read, &items_written, &error);
167 if (utf8_len == strlen (utf8))
171 result2 = g_utf8_to_ucs4 (utf8, -1, &items_read2, &items_written2, &error2);
186 result3 = g_utf8_to_ucs4 (utf8, utf8_len, NULL, NULL, &error3);
230 const char *utf8,
280 g_assert (strcmp (result, utf8) == 0);
284 g_assert (strcmp (result3, utf8) == 0);
292 check_utf8_to_utf16 (const char *utf8,
305 result = g_utf8_to_utf16 (utf8, utf8_len, &items_read, &items_written, &error);
307 if (utf8_len == strlen (utf8))
311 result2 = g_utf8_to_utf16 (utf8, -1, &items_read2, &items_written2, &error2);
326 result3 = g_utf8_to_utf16 (utf8, utf8_len, NULL, NULL, &error3);
370 const char *utf8,
409 g_assert (strcmp (result, utf8) == 0);
428 g_assert (strcmp (result, utf8) == 0);
432 g_assert (strcmp (result3, utf8) == 0);
586 char *utf8;
590 utf8 = "abc";
594 check_utf8_to_ucs4 (utf8, 3, ucs4, 3, 0);
595 check_ucs4_to_utf8 (ucs4, 3, utf8, 3, 0);
596 check_utf8_to_utf16 (utf8, 3, utf16, 3, 0);
597 check_utf16_to_utf8 (utf16, 3, utf8, 3, 0);
601 utf8 = "\316\261\316\262\316\263";
605 check_utf8_to_ucs4 (utf8, 6, ucs4, 3, 0);
606 check_ucs4_to_utf8 (ucs4, 3, utf8, 6, 0);
607 check_utf8_to_utf16 (utf8, 6, utf16, 3, 0);
608 check_utf16_to_utf8 (utf16, 3, utf8, 6, 0);
612 /* partial utf8 character */
613 utf8 = "abc\316";
617 check_utf8_to_ucs4 (utf8, 4, ucs4, 3, 3);
618 check_utf8_to_utf16 (utf8, 4, utf16, 3, 3);
620 /* invalid utf8 */
621 utf8 = "abc\316\316";
625 check_utf8_to_ucs4 (utf8, 5, ucs4, 0, 3);
626 check_utf8_to_utf16 (utf8, 5, utf16, 0, 3);
629 utf8 = "ab";
633 check_utf16_to_utf8 (utf16, 3, utf8, 2, 2);
637 utf8 = NULL;
641 check_utf16_to_utf8 (utf16, 3, utf8, 0, 2);
645 utf8 = NULL;
649 check_ucs4_to_utf8 (ucs4, 3, utf8, 0, 2);