Re: Reading UTF-8 encoded text file

hi all,


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.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]