Re: Reading UTF-8 encoded text file
- From: "Claudio Polegato Junior" <cpolegatojr_lsts pop com br>
- To: "Magyari, Miklos" <miklos magyari hp com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Reading UTF-8 encoded text file
- Date: Fri, 10 Sep 2004 16:01:52 -0300 (BRT)
See g_locale_to_utf8 and g_locale_from_utf8.
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.
] [Thread Prev