UTF-8 sequences in filenames



Hi!

I'd like to raise problem we (in Russian community) encountered with
filenames.
The problem exists in non-unicode locales (ru_RU.KOI8-R, ru_RU.CP1251)
with mamy GNOME apps (gedit, glade, nautilus at least). Files with
national filenames are viwed through file selector (G_BROKEN_FILENAMES
is set) and can be opened. But newly created files looks on filesystem
(in mc for example) as UTF-8 sequences.
We have some preliminary patches to gnome-vfs but we have no confidence
in that gnome-vfs is only source of problem. It should be good to find
out thougths of gnome-vfs developers about that.
We see two possibilities:
1. Gnome-vfs is broken and need patching. Seems it is not using
g_filename_from_utf8/uri() functions from glib at all. Then where is
control point for possible conversion? In other words which public
functions work with "locale-dependant" filenames and which work with UTF
definitely? Brief look at gedit sources shows
gnome_vfs_get_local_path_from_uri is used to get filename to feed to
fopen(). So it should produces locale filename on output. Also may be
do_action() functions in method/file-method.c and some other methods
should use g_filename_fron_utf8/uri().
2. Gnome-vfs is OK but developer do not use it power properly. Then it
should exist some document with description of right method of dealing
with filenames. That document should be widely known to developers.

Regards,
Dmitry





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