Filenames chars

Corinna Vinschen
Mon Jun 14 15:32:00 GMT 2004

On Jun 14 10:53, Pierre A. Humblet wrote:
> Corinna Vinschen wrote:
> > As far as I remember, the call worked around a problem which happens
> > in codepage:oem case.  In that case, the user enters filenames on the
> > console in the OEM specific charset but the GetFileSecurity function
> > always treats names as in ANSI charset without conversion.  That's the
> > reason it's only used in read_sd.
> But what happens then if the filename is not read from the console
> but e.g. from a script? 

Well, hmm, if the user is using codepage:oem throughout, the script
should theoretically contain the name in OEM charset, shouldn't it?

> > We seem to have a similar problem now with NtCreateFile.  A conversion
> > from oem into the system character set seems to be necessary.  The usual
> > call to sys_wcstombs in str2buf2uni is apparently not quite ok.
> Right. That's why I asked. I find all of that encoding very confusing.
> [Un]fortunately, I can't test any of that.

I have the same feeling about this.  The codepage stuff is as worse an
invention as the textmode handling.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Co-Project Leader
Red Hat, Inc.

More information about the Cygwin-developers mailing list