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

Corinna Vinschen
Wed Jul 2 12:51:00 GMT 2008

On Mar 11 19:25, Corinna Vinschen wrote:
> On Mar 11 12:31, Christopher Faylor wrote:
> > On Tue, Mar 11, 2008 at 11:55:45AM +0100, Corinna Vinschen wrote:
> > >On Mar 11 11:50, Corinna Vinschen wrote:
> > >> Case sensitivity is still not possible with this approach.  You
> > >> can get generic case sensitivity in Cygwin with a bit of work.  The 
> > >> magic flag is OBJ_CASE_INSENSITIVE in the object attributes.  However,
> > >> this would not work for fork/exec.
> > >
> > >Oh, and, beginning with Windows XP, you would have to enable case
> > >sensitivity in the kernel. Set the DWORD
> > >
> > >HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel\obcaseinsensitivity
> > >
> > >to 0x0 and reboot.  No worries, this doesn't affect Win32 calls.
> > 
> > I thought this had come up before and that it affected files in
> > Explorer, i.e., you delete file "A" and file "a" gets deleted too or
> > something like that.
> If you created two files which only differ by case, then, yes, Explorer
> will behave somewhat excentric.  What I meant above is, you can still
> just run any Win32 application if you did the above change in the
> registry.  It's not like this breaks the whole system in some way.
> > FWIW, I'm all for getting rid of managed mounts if we can create all of
> > the same stuff transparently.
> Given the uppercase/lowercase problem, it doesn't sound too much that
> we can get rid of managed mounts.  We could change them to use the
> outlined method of using special unicode chars.

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

- 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.

Every time I think about this, I'd also love to get rid of managed
mounts and always be in POSIX mode with case-sensitivity and not
allowing Win32 paths but treating all filenames as POSIX filenames
on input and all that...

But then again, we're Cygwin, not Interix, right?

I'm all torn...

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