[Mono-devel-list] Re: patch for: Non ASCII characters infilenames/ command line parameters
Gaute B Strokkenes
biggaute at uwc.net
Wed Oct 22 05:57:08 EDT 2003
On 21 okt 2003, dick at ximian.com wrote:
On Tue, 2003-10-21 at 11:08, Gaute B Strokkenes wrote:
>> On 21 okt 2003, joergr at voelcker.com wrote:
>>> If it's not possible to change this behaviour entirely, how about
>>> using an environment variable to change behaviour from default
>>> (UTF8) to current locale encoding of filenames?
>> G_BROKEN_FILENAMES is what GTK uses these days.
> G_BROKEN_FILENAMES doesn't help.
> Firstly, locale-encoded filenames are not BROKEN, by any stretch of
> the imagination.
I agree with you that the GTK people could do with a bit less attitude
here. (Though there are good reasons why the posix model of
any-byte-except-slash-is-ok is tricky to deal with in programs where
everything is stored internally in some unicode format and converted
> Secondly, expecting end users to know about internals of glib
> filename handling is stupid.
Well, maybe. But:
1) The world does not consist solely of end-users.
2) End-users who encounters this problem with mono apps will likely
also encounter it with Gnome and all the other Gtk- and Glib-based
programs out there. If they ask for help on a mailing list or any
other forum they will probably be offered a solution in the form of a
magic invocation involving G_BROKEN_FILENAMES. If Mono goes the same
route, then it will magically work for Mono apps too.
In other words, a solution for this problem will necessarily be
relatively obscure. Given that, it makes sense to pick the same
solution as other people, rather than invent another obscure
mechanism. For instance I would expect that distributions that throw
unsuspecting end-users into a gnome session would have the good sense
to set G_BROKEN_FILENAMES appropriately (though you never know; I
don't have the opportunity to check it personally).
> And anyway, it doesn't work because Jôrg wants newly created files
> to have names with locale encodings and G_BROKEN_FILENAMES doesn't
> apply there.
I just performed an experiment with gedit (Gnome gedit 2.2.1, debian
unstable) and it seems that G_BROKEN_FILENAMES is honoured when
creating new files, contrary to what you seem to expect.
Gaute Strokkenes http://www.srcf.ucam.org/~gs234/
I'm continually AMAZED at th'breathtaking effects of WIND EROSION!!
More information about the Mono-devel-list