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

Corinna Vinschen
Wed Mar 12 16:46:00 GMT 2008

On Mar 12 17:15, Corinna Vinschen wrote:
> On Mar 12 15:44, Corinna Vinschen wrote:
> > More crap.  I tried all the different space characters from 0x2000 up
> > to 0x200b, the latter one promisingly called "hair space".  All of them
> > are printed as box character in Explorer.  Sigh.
> I just applied a preliminary patch which transforms the invalid file
> chars to the 0xf000 unicode page and back again.  This patch also
> disables the old code which handles managed mounts and replaces it
> with also moving uppercase chars to the 0xf000 area on a managed mount.

Btw., scratch the argument about Interix compatibility.  The last tests
with Interix on Windows XP were quite annoying.

- Interix does not allow to create files with *all* special DOS chars.
  It only handles a subset: ':', '|', '?' and '*'.  You can't create
  files with '<', '>', '"', or '\\' in it.  Cygwin now only chokes on
  the backslash.

- Interix does *not* just convert 0xf0xx to 0x00xx chars.  It does so
  only for the few characters it allows to use when creating files.
  Files created in Cygwin, say, for instance, "a<b" result in:

    Interix$ ls -l
    ls: a?b: No such file or directory.

- Last but not least, Interix is not able to use path names longer than
  about 512 chars.  I tried to create a deep directory structure.
  When I was in a directory 480 chars deep and tried to cd into the
  next one (530 chars), the Interix csh simply crashed and disappeared.
  Interix ksh was not quite as bad:

    $ cd 1234567890123456789012345678901234567890
    $ pwd | wc -c
    /bin/ksh: pwd: can't get current directory - Permission denied



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