Loading a text file into a GtkTextView fails g_utf8_validate()
I have a little program I'm writing and it's using a GtkSourceView. When I load text files I've created on my own system, it works fine. However, when I try to load a file that was created using a windows system, I cannot load it because it fails the utf8 validation. How can I detect the type and convert it to utf8 so that it can be used in the GtkTextBuffer?
PS. I'm using C and GTK+ to write the application for Gnome.
|