Lines Matching refs:utf8
82 gchar *utf8,
88 gboolean is_valid = g_utf8_validate (utf8, -1, &end);
117 ucs4_result = g_utf8_to_ucs4 (utf8, -1, NULL, NULL, &error);
126 ucs4_result = g_utf8_to_ucs4 (utf8, -1, &items_read, NULL, &error);
128 if (!ucs4_result || items_read == strlen (utf8))
142 ucs4_result = g_utf8_to_ucs4 (utf8, -1, &items_read, &items_written, &error);
150 items_read != strlen (utf8) ||
159 ucs4_result = g_utf8_to_ucs4_fast (utf8, -1, &items_written);
171 fail ("line %d: conversion back to utf8 failed: %s", line, error->message);
175 if (strcmp (utf8_result, utf8) != 0 ||
177 items_written != strlen (utf8))
179 fail ("line %d: conversion back to utf8 did not match original\n", line);
204 if (!(utf16_expected_tmp = (gunichar2 *)g_convert (utf8, -1, TARGET, "UTF-8",
233 if (!(utf16_from_utf8 = g_utf8_to_utf16 (utf8, -1, &items_read, &items_written, &error)))
239 if (items_read != strlen (utf8) ||
268 fail ("line %d: conversion back to utf8 failed: %s\n", line, error->message);
273 items_written != strlen (utf8))
275 fail ("line %d: length error in conversion from ucs16 to utf8\n", line);
281 fail ("line %d: conversion back to utf8/ucs4 failed\n", line);
292 if (strcmp (utf8, utf8_result) != 0 ||
295 fail ("line %d: conversion back to utf8/ucs4 did not match original\n", line);
320 gchar *utf8 = NULL; /* Quiet GCC */
327 testfile = g_strconcat (srcdir, G_DIR_SEPARATOR_S "utf8.txt", NULL);
331 croak ("Cannot open utf8.txt: %s", error->message);
357 utf8 = tmp;
406 process (start_line, utf8, status, (gunichar *)ucs4->data, ucs4->len);
408 g_free (utf8);