Quoting Christian Biere <[EMAIL PROTECTED]> from ml.softs.gtk-gnutella.devel:
:My conclusion is:
:If your locale encoding is not UTF-8 and an UTF-8 encoded filename
:is compatible with your locale encoding and the environment variable
:G_BROKEN_FILENAMES is set, Gtk-Gnutella shall convert the filename
:to your locale encoding. Otherwise, the filename shall be kept as-is.
G_BROKEN_FILENAMES is a superbly arrogantly-named variable.
My filenames are not UTF-8 encoded, they are ISO-8859-1 and I don't
consider that "broken" in any way as long as I know that it's the
encoding I use and I want to keep for now.
I've also noticed what I consider bogus filenames (i.e. UTF-8 encoded)
generated by GTKG. That's very wrong. GTKG has no right to assume I
want UTF-8 encoding for my filenames.
The problem is not trivial to solve. Nowhere is there any real way to
say what the local encoding of filenames should be for "foreign" filenames
transmitted from the network.
UTF-8 is really THE only encoding that should be used when transmitting
filenames on Gnutella. There is no question about it. However, I strongly
disagree about having my filenames UTF-8 encoded. For historical reasons,
my filenames are ISO-8859-1 encoded, and I intend to keep it that way because
it's my business.
I don't want to set G_BROKEN_FILENAMES before launching gtk-gnutella because
that would be admitting I'm doing something wrong to some glib/gtk/gnome
self-proclaimed "filenaming authority" and I don't think I'm doing anything
wrong.
My conclusion:
GTKG must be smart and try to apply the best heuristics it can to do
"the right thing" in 99% of the cases.
My environment says:
LANG=fr_FR
LC_COLLATE=C
LC_MESSAGES=C
LC_TIME=C
LC_MONETARY=C
LC_NUMERIC=C
It makes sense to infer from that that my filenames are ISO-8859-1 encoded.
GTKG needs to know to convert them to UTF-8 anyway. So it can also
perform the conversion back.
Raphael
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Gtk-gnutella-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel