Erik de Castro Lopo wrote:

> Anyone care to clue me into the best way to deal with this?

I've tried something like this:

    static void
    convert_string (const char * in, gchar * out, size_t maxlen)
    {
        GString * utf8 = g_string_sized_new (2 * strlen (in)) ;
        const gchar * p;

        for (p = in; *p != '\0'; p++)
            g_string_append_unichar (utf8, (gunichar) *p);

        utf8->str [utf8->len] = 0;
        snprintf (out, maxlen, "%s", utf8->str);
        g_string_free (utf8, TRUE);
    }

but that doesn't solve the problem.

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
_______________________________________________
coders mailing list
coders@slug.org.au
http://lists.slug.org.au/listinfo/coders

Reply via email to