[Mono-devel-list] patch for: Non ASCII characters in filenames / command line parameters

Dick Porter dick at ximian.com
Fri Oct 17 10:02:00 EDT 2003


On Wed, 2003-10-15 at 17:50, Uwe Oertel wrote:
> Hello,
> 
> regarding the known problem using language specific character encoding,
> I did a patch in unicode.h, unicode.c (mono/io-layer) and object.c
> (mono/metadata)
> that should now work for filenames and command line parameters.
> It does convert the (internal) unicode string to a locale string, before
> creating / opening a file in the file system (the other way around is 
> implemented yet) and it now converts locale command
> line parameters to UTF-8 before passing it to the regular gnome-lib /
> mono - functions.

I'm not convinced this is necessary, but even if it is this patch won't
be applied.  The reason is that the only interface to the io-layer
functionality has to be via the windows API, because otherwise it will
break portability to windows.

I can see the benefits of dealing with non-utf8 encodings for filenames
and command line parameters (indeed, I had a long argument with a glib
developer this week over this very issue), but it needs to be solved in
a portable way, and in a way that doesn't break passing arguments in
utf8.

Unfortunately text encodings are a mess at the moment, and trying to
guess the encoding of a stream of bytes is problematic at best.  The
main linux distributions are trying to move everything to utf8.  That
doesn't help legacy systems or data, but it is definitely the way
forward.

- Dick





More information about the Mono-devel-list mailing list