[Mono-devel-list] patch for: Non ASCII characters in filenames/ command line parameters
dick at ximian.com
Mon Oct 20 11:42:29 EDT 2003
On Sat, 2003-10-18 at 15:08, Jörg Rosenkranz wrote:
> > 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.
> This statement I don't understand. The interface defined in unicode.h
> has not been changed, it's only extended. Uwe used glib functions for
> character set conversion like you did in _wapi_unicode_to_utf8 and
> changed this function to convert to the local character set instead
> of always UTF8. Maybe this is only usefull running under Linux, but
> there are other operating system differences to be handled by Mono
> too. How is this been done? Is there no option to do this file name
> conversion under Linux/Unix only?
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.
> If UTF8 is set as locale it should work too. But command line parameters
> are not the main problem. The problem we can't work around is the
> file name handling of Mono.
> You don't have to guess any encodings in this case. File names are
> created using the configured locale by all other applications. They have
> to be read and written using this locale by Mono too or it simply doesn't
> work on non english/non UTF8 systems. Using UTF8 is no option for us
> because we don't have the option to switch to this encoding.
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?
More information about the Mono-devel-list