test.cpp: In function ‘gchar* g_tf8_strescape(const gchar*, const gchar*)’:
test.cpp:29:33: error: invalid conversion from ‘const guchar* {aka const unsigned char*}’ to ‘const gchar* {aka const char*}’ [-fpermissive]
   while ((c = g_utf8_get_char (p)))
                                 ^
In file included from /usr/include/glib-2.0/glib/gstring.h:35:0,
                 from /usr/include/glib-2.0/glib/giochannel.h:36,
                 from /usr/include/glib-2.0/glib.h:56,
                 from test.cpp:1:
/usr/include/glib-2.0/glib/gunicode.h:649:10: error:   initializing argument 1 of ‘gunichar g_utf8_get_char(const gchar*)’ [-fpermissive]
 gunichar g_utf8_get_char           (const gchar  *p) G_GNUC_PURE;
          ^
test.cpp:65:41: error: invalid conversion from ‘const guchar* {aka const unsigned char*}’ to ‘const gchar* {aka const char*}’ [-fpermissive]
       p = g_utf8_find_next_char (p, NULL);
                                         ^
In file included from /usr/include/glib-2.0/glib/gstring.h:35:0,
                 from /usr/include/glib-2.0/glib/giochannel.h:36,
                 from /usr/include/glib-2.0/glib.h:56,
                 from test.cpp:1:
/usr/include/glib-2.0/glib/gunicode.h:663:10: error:   initializing argument 1 of ‘gchar* g_utf8_find_next_char(const gchar*, const gchar*)’ [-fpermissive]
 gchar*   g_utf8_find_next_char    (const gchar *p,
          ^
test.cpp:65:41: error: invalid conversion from ‘gchar* {aka char*}’ to ‘const guchar* {aka const unsigned char*}’ [-fpermissive]
       p = g_utf8_find_next_char (p, NULL);
                                         ^
