Raphael Manfredi wrote:
> 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.

Yeah well I didn't invent it.
 
> 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 want my Deutsche Mark back too. Euro suxx0rz!11.
 
> 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.

Okay, we can show these fuckers what we think of them and use a
Gtk-Gnutella specific property instead like "convert_filenames_to_locale"
or sth like that. Although for file dialogs in Gtk+ 2.x you'd still
need the environment variable to see non-UTF-8 filenames.
 
> 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.

I'd think you can prove mathematically that this is impossible to do.
 
> 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.

Trust me, even Debian has no AI. It uses ISO-8859-1 (at least I assume
it from what you say) because that's the (somewhere) hardcoded default
for the language code fr_FR.

> GTKG needs to know to convert them to UTF-8 anyway.  So it can also
> perform the conversion back.

As long as the filenames are ISO-8859-1 compatible that's fine with
me. If you say so I consider this a 2000:1 and even do this by
default. But conversion (actually destruction) to something
meaningless won't happen neither by default nor optionally. I'd
rather implement a prevention that allows you to download such
files or see such results in the first place.

-- 
Christian

Attachment: pgp0fbGsJxRiI.pgp
Description: PGP signature

Reply via email to