[Mono-devel-list] patch for: Non ASCII characters infilenames/ command line parameters
Jörg Rosenkranz
joergr at voelcker.com
Tue Oct 21 04:48:25 EDT 2003
Hello Dick,
> -----Original Message-----
> From: Dick Porter [mailto:dick at ximian.com]
> Sent: Monday, October 20, 2003 5:42 PM
>
> The io-layer/ directory is a windows api portability library.
> It is not
> built on windows, therefore the exposed api has to conform to the
> published windows api. Uwe tried to use internal io-layer
> functions in
> other parts of mono, and thats the part that isn't permitted.
>
OK. That was the command line parameter parsing part. It's a minor
problem for us when this doesn't work.
>
> Can you remind me what the exact problem is?
>
> Newer versions of mono should be able to see filenames in the locale
> encoding. It will write filenames in utf8 though. Would some sort of
> environment option to call g_locale_from_utf8() on the
> filename at file
> open do what you need?
>
Our problem is writing/creating/moving/etc. of files and directories. Basically
every file operation in io.c where _wapi_unicode_to_utf8 is used. That's why
Uwe replaced the implementation of this function with a conversion
to strings of current locale. Maybe the name of this function should be changed
to reflect the new behaviour too.
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?
We have found one side effect of this change: setlocale(LC_ALL, "") has to be
called to get this working. Mono did this already, but apps using embedded Mono
have to do this too.
Jörg.
More information about the Mono-devel-list
mailing list