Handling non-UTF-8 filename

Posted 26 Apr 2005 at 23:44 UTC by kz Share This

G_FILENAME_ENCODING variable and convenient filename functions work.

gnome-background-properties of gnome-control-center gather image files from desktop and pass one of them over background property in gconf.

On the way, an XML file used to save the list of files. You cannot write non-UTF-8 string in XML of UTF-8 encoding, as gconf is.

GLib provides convenient functions here; g_filename_to/from_uri(), g_filename_to/from_utf8() and g_filename_display_basename(). You can bypass UTF-8 wall with them. G_FILENAME_ENCODING environment variable refered inside.

I wrote a little lines of patch for bug 168604 with this issue. Many other parts of GNOME can change, I believe.

Congratulations on your patch, posted 30 Apr 2005 at 15:40 UTC by rillian » (Master)

The correct link to the bug seems to be bug 168604.

Thanks for letting us know about your contribution. Following up to address the memory leak issues with the patch would be a good next step. :)

Come again?, posted 4 May 2005 at 16:20 UTC by Mysidia » (Journeyer)

That's cool and all for Gnome, I guess.. it sounds as if you have an improvement, possibly. But isn't there a more appropriate specific forum for elaborating on the internals of Gnome in such a specific way?

I guess you lost me when you said 'gconf'.

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!

Share this page