From: <Rap...@po...> - 2005-09-28 22:22:44
|
Quoting Christian Biere <chr...@gm...> from ml.softs.gtk-gnutell= a.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" filename= s 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 strong= ly 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 bec= ause it's my business. I don't want to set G_BROKEN_FILENAMES before launching gtk-gnutella beca= use 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 anythi= ng 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=3Dfr_FR LC_COLLATE=3DC LC_MESSAGES=3DC LC_TIME=3DC LC_MONETARY=3DC LC_NUMERIC=3DC It makes sense to infer from that that my filenames are ISO-8859-1 encode= d. GTKG needs to know to convert them to UTF-8 anyway. So it can also perform the conversion back. Raphael |