1 #include <wmcliphist.h>
4 * converts text in UTF-8 to charset by actual locale
7 from_utf8(gchar
*string
) {
12 /* gchar *error_msg; */
15 converted
= g_locale_from_utf8(string
, -1, &bytes_read
, &bytes_written
,
17 error_code
= (error
== NULL
) ? 0 : error
->code
;
19 * fprintf(stderr, "from_utf8: %d b read, %d b written, error: %d\n",
20 * bytes_read, bytes_written, error_code);