Reading UTF-8 encoded text file
- From: "Magyari, Miklos" <miklos magyari hp com>
- To: <gtk-app-devel-list gnome org>
- Subject: Reading UTF-8 encoded text file
- Date: Wed, 8 Sep 2004 14:44:17 +0200
I have a file that is an UTF-8 encoded text file. I would like to read
it line by line and place the lines in GString.
My idea was using standard library calls (such us fgets) for file
manipulation and reading the lines to a char* buffer, and then some glib
API calls to place these strings into a GString (e.g I've tried
g_string_new). Unfortunately there is something wrong as I'm unable to
have the correct UTF-8 strings in the GStrings, it seems that the data
is converted somewhere.
I would really appreciate any suggestions about which API calls should I
] [Thread Prev