Christian Biere wrote: > The default character set used for filenames is UTF-8. If you want to > use the current locale instead use G_FILENAME_ENCODING="@locale" or > G_FILENAME_ENCODING="@locale,ISO-8859-1,<whatever>" etc. > Since we need emulation of this for GLib 1.2.x and older versions of > GLib 2.x anyway, GTKG will simply use its own routines. However for the > moment, I'll only use first element of the list (i.e., the primary > filename character set), so don't be surprised if <whatever> -> UTF-8 > conversion doesn't work.
I've implemented this now and it should work with both front-ends. If
G_FILENAME_ENCODING is not set, there should be no difference. I highly
recommend using UTF-8 as locale and especially as primary
G_FILENAME_ENCODING character set, even it may cause some annoyances for
now.
Gtk-Gnutella prints a startup message showing which locale character set
and filename character set(s) it will use.
A weird case is using something like
LC_ALL=C G_FILENAME_ENCODING=ISO-8859-1
It's weird because the GUI converts from the current locale (here ASCII)
to UTF-8 if necessary but the filenames are converted to ISO-8859-1.
This means if you would get a result Mäusetanz.ogg (from BearShare which
emits usually ISO-8859-1), the file would be stored as that but the
search result screen shows M_usetanz.ogg. The downloads pane shows the
"correct" name again. It's not a bug, it's a feature. I'll also
implement use of additional filename character sets but I don't think
it's a good idea to overload G_FILENAME_ENCODING to convert search
results in general. That means the additional sets are only used to
convert filenames from filesystem to UTF-8, not any other strings.
--
Christian
pgp3t4qUmsAfB.pgp
Description: PGP signature
