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 09:15:00 GMT 2018
Thank you
> From: Marco Atzeri <marco.atzeri@gmail.com>
> what happen if you use bash ?
With cmd + bash, the problem does not occur, but I would like to use cmd
without bash, if possible.
> From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
> To: cygwin@cygwin.com
> Date: 2018/07/27 14:25
> Subject: Re: cmd.exe and file name conversion from comman line argument
> Sent by: cygwin-owner@cygwin.com
> Under a Unix shell, both double quote " and single quote/apostrophe '
are
> quoting metacharacters, as is backquote/grave `, but any character may
be used
> in a file name by prefixing with the escape character \.
> Under Windows cmd only double quote " is a quoting metacharacter; path
spec
> delimiters : \ /, wild card characters * ?, and redirection
> characters | < > are
> also not allowed in file names. So to create a Windows file name with a
space
> from cmd, use only double quotes " around the name.
Thank you. quoting only the space character worked, which seems to solve
my problem.
from cmd, with LANG environment variables set to ja_JP.UTF-8
c:\cygwin\home\hiroo> touch ãã" "ã
or
c:\cygwin\home\hiroo> touch ãã' 'ã
gives a file named ãã ã.
The rest may be superfluous, but just to compare with.
Quoting Japanese characters too did not work.
c:\cygwin\home\hiroo> touch "ããã"
gives
c:\cygwin\home\hiroo> ls
'"ããã"'
(and shown as ã»ãããã» in explorer)
while
c:\cygwin\home\hiroo> touch "aaa"
gives
c:\cygwin\home\hiroo> ls
aaa
Doing
c:\cygwin\home\hiroo> echo > "ããã"
(in this case, the file name is surely processed by cmd)
gives a file named ããã (without quotes).
> Under Cygwin, any file name characters disallowed by Windows are mapped
into
> Unicode private use area characters, but converted back on display, so
under
> Windows programs those files' long names will display characters without
> assigned glyphs.
>
> Note that in ls, nongraphic characters in a file name entry e.g. space,
causes
> that file name entry to be displayed single quoted 'a b'; specifying ls
> -N|--literal|--quoting-style=literal omits the single quotes, but
nongraphic
> characters are displayed on terminals as question marks ?, unless
> --show-control-chars is also specified.
> Run "info ls 'Formatting the file names'" to see full explanations.
>
> --
> Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
>
---------
Hiroo Ono
BKCBØ[H\ÜÎËØÞYÝÚ[ÛÛKÜØ[\Ë[BTNËØÞYÝÚ[ÛÛKÙ\KÃBØÝ[Y[][ÛËØÞYÝÚ[ÛÛKÙØÜË[B[ÝXØÜXH[ÎËØÞYÝÚ[ÛÛKÛ[ÈÝ[ÝXØÜXK\Ú[\CBB
More information about the Cygwin
mailing list