[Gtk-sharp-list] Gdk.Pixbuf and UTF-8

farolfo farolfo at hotmail.com
Mon Feb 1 12:57:48 EST 2010

In win32 system when I load a new picture in a pixbuf I recive a missing file
exception exeption if file name contains latin char. I've read that gdk
works with UTF-8 string format.

I've made this function to convert string, but the problem persist:

    public string ConvertUTF8(string unicodeString)
        byte[] isoBytes = null;
        Encoding iso_stand = default(Encoding);
        iso_stand = Encoding.Unicode;
       isoBytes = iso_stand.GetBytes(unicodeString.ToCharArray());
       byte[] result = Encoding.Convert(iso_stand, Encoding.UTF8, isoBytes);
       return Encoding.UTF8.GetString(result);

How I can fix this problem ?

View this message in context: http://old.nabble.com/Gdk.Pixbuf-and-UTF-8-tp27408385p27408385.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.

More information about the Gtk-sharp-list mailing list