This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygpath -w 'a"b'

On Jul 14, 2016, at 8:36 AM, Brien Oberstein <> wrote:
> cygpath -w 'a"b' doesn't seem to translate the double quotes into a windows
> accesible file name.

Double quotes are illegal on NTFS:

> what is the proper way to translate from cygwin
> filenames with special mapped characters (eg " and : )?

If you look at such a file name in Explorer, Cygwin (?) seems to be mapping double-quotes to U+F022, which is currently not defined within Unicode:

That’s fine as far as Cygwin goes, but it still isn’t going to make native Windows programs believe that double-quotes are legal in file names.

While playing with all of this, I stumbled across an actual cygpath bug:

  $ mkdir 'the "foo" directory’
  $ cygpath -w 'the "foo" directory/' | od -c
  0000000   t   h   e       "   f   o   o 357 200 242       d   i   r   e
  0000020   c   t   o   r   y   \  \n

That is, it translates the second double-quote only.

Attempting something more like what Brien talks about also fails:

  $ mkdir 'a"b'
  $ explorer 'a"b'                        # opens my Documents folder!
  $ explorer "$(cygpath -w 'a"b')"        # ditto
  $ explorer $(echo -e "a\xEF\x80\xA2b")  # opens expected folder

Strange stuff.
Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]