Filenames with Win32 special characters (or: Interix filename compatibility)

Corinna Vinschen
Fri Jul 11 17:17:00 GMT 2008

On Jul 11 11:45, Christopher Faylor wrote:
> On Fri, Jul 11, 2008 at 03:18:40PM +0200, Corinna Vinschen wrote:
> >On Jul  2 14:50, Corinna Vinschen wrote:
> >> Two months later, here's a question:  Should we start to allow real case
> >> sensitivity?  Changing the above registry key is not exactly rocket
> >> science.  I had this idea to change the definition of non-managed and
> >> managed mounts like this:
> >> 
> >> - non-managed means case-insensitive and not converting chars to the
> >>   UNICODE Private Use Area.  This means sticking to good old Win32
> >>   compatibility.
> >> 
> >> - managed means, all file operation are using case-sensitivity and
> >>   special chars (:,<,>) are converted to the Private Use Area.
> >>   Still, that won't work with fork/exec, due to using the Win32
> >>   function CreateProcess.
> >
> >If nobody has an opinion, I'll implement it as above and we can just
> >see how it works out.  It's not really tricky, just conditional path
> >case matching and setting a flag in calls to InitializeObjectAttributes.
> I've been meaning to give my opinion.  Here it is:
> I am uncomfortable with changing things on a global basis like this but
> if we do it within cygwin and it is easy to switch back and forth then
> that would be ok, at least for experimentation.

That's why I thought it might be a good thing to have case sensitivity
only in managed mounts.  The user (or a script) would still have to tweak
the registry key
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel\obcaseinsensitivity
when running XP or later.  That's the same setting Interix needs to get
case sensitivity.

Here's another question.

Case sensitivity and converting special chars to the 0xf0xx range are
actually two different problems.  The conversion is only required on
FAT or NTFS (including Samba) but not on NFS or EXT2.  So, actually
we have more cases which look useful:

- nothing, just standard Win32 compatibility

- convert special char and convert upper case, for those who need it
  but don't want to tweak the registry

- case sensitive, for NFS, EXT2, etc.

- convert special char and case sensitive, for FAT, NTFS, Interix

So, wouldn't it make sense to have two mount options, one for the char
conversion ("managed") and one for case sensitivity ("case", "posix")?


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

More information about the Cygwin-developers mailing list