UTF-8 filenames
- From: bcml swiftdsl com au
- To: gtk-devel-list gnome org
- Subject: UTF-8 filenames
- Date: Fri, 4 Feb 2005 21:17:19 +1100 (EST)
Greetings,
I am attempting to write some text to a file (and am using
bookbase.sourceforge.net as a code base. Bookbase was written with
gtk1.2). I am using gtk2 and currently have the following:
void load_config () {
FILE *infile;
gchar filename[128];
strcpy ( filename, getenv("HOME") );
strcat ( filename, "/.qconfig" );
if (( infile = fopen ( filename, "r" )) != NULL )
g_print ( "infile: %s\n", infile );
if ( infile == !NULL)
//snip
}
At runtime I receive the error: "Invalid UTF-8". I have been looking
around the net (eg glib API "glib-Character-Set-Conversion.html") for a
few days to try and find a solution, I think I know why it it is not
working but can't seem to fix it.
I have tried functions such as g_filename_from_utf8 & g_locale_from_utf8 &
others but I can't seem to avoid getting the Invalid UTF-8 errors. As far
as I am aware my filesystem locale is en_AU (on Debian).
Thanks for any help (or code examples),
bcml swiftdsl com au
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]