This is the mail archive of the
mailing list for the Cygwin project.
Re: cygpath -w 'a"b'
- From: Warren Young <wyml at etr-usa dot com>
- To: The Cygwin Mailing List <cygwin at cygwin dot com>
- Date: Thu, 14 Jul 2016 09:24:13 -0600
- Subject: Re: cygpath -w 'a"b'
- Authentication-results: sourceware.org; auth=none
- References: <email@example.com>
On Jul 14, 2016, at 8:36 AM, Brien Oberstein <firstname.lastname@example.org> 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
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple