cmd.exe and file name conversion from comman line argument
h_ono@ot.olympus.co.jp
h_ono@ot.olympus.co.jp
Fri Jul 27 10:16:00 GMT 2018
> From: Hiroo Ono/jp/olympus@olympus
> To: cygwin@cygwin.com
> Date: 2018/07/27 15:57
> Subject: Re: cmd.exe and file name conversion from comman line argument
> Sent by: cygwin-owner@cygwin.com
>
> c:\cygwin\home\hiroo> touch "ããã"
>
> gives
>
> c:\cygwin\home\hiroo> ls
> '"ããã"'
It may be related to build_argv() in
https://github.com/mirror/newlib-cygwin/blob/master/winsup/cygwin/dcrt0.cc
line 320 to 328:
/* Skip over characters until the closing quote */
{
sawquote = cmd;
/* Handle quoting. Only strip off quotes if the parent is
a Cygwin process, or if the word starts with a '@'.
In this case, the insert_file function needs an unquoted
DOS filename and globbing isn't performed anyway. */
cmd = quoted (cmd, winshell && argc > 0 && *word != '@');
}
As the comment says,
c:\cygwin\home\hiroo> touch @"ããã"
gives file named @ããã.
---------
Hiroo Ono
ТÒÐÐ¥&ö&ÆVÒ&W÷'G3¢GG¢òö7wvâæ6öÒ÷&ö&ÆV×2æFÖÀФd¢GG¢òö7wvâæ6öÒöfðФFö7VÖVçFFöã¢GG¢òö7wvâæ6öÒöFö72æFÖÀÐ¥Vç7V'67&&Ræfó¢GG¢òö7wvâæ6öÒöÖÂò7Vç7V'67&&R×6×ÆPÐ Ð
More information about the Cygwin
mailing list