public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: h_ono@ot.olympus.co.jp
To: cygwin@cygwin.com
Subject: Re: cmd.exe and file name conversion from comman line argument
Date: Fri, 27 Jul 2018 09:15:00 -0000	[thread overview]
Message-ID: <OFC009BF8B.B56C9990-ON492582D7.001F2504-492582D7.0026257B@ot.olympus.co.jp> (raw)
In-Reply-To: <950baa09-f613-334e-7f27-b0cad8ba9d14@SystematicSw.ab.ca>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 2750 bytes --]

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
\x03B‹KCB”\x1c›Ø›\x19[H\x1c™\^[ܝ\x1cΈ\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÜ\x1c›Ø›\x19[\Ëš\x1d^[[\x03B‘TNˆ\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÙ˜\KÃB‘^[ØÝ[Y[\x18]\x1a[ÛŽˆ\b\b\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÙ^[ØÜËš\x1d^[[\x03B•[œÝXœØÜšX™H\x1a[™›Îˆ\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÛ[\vÈÝ[œÝXœØÜšX™K\Ú[\^[\x19CBƒB

  reply	other threads:[~2018-07-27  6:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-27  5:24 h_ono
2018-07-27  6:56 ` Marco Atzeri
2018-07-27  7:27 ` Andrey Repin
2018-07-27  8:08 ` Brian Inglis
2018-07-27  9:15   ` h_ono [this message]
2018-07-27 10:16     ` h_ono
2018-07-27 15:16     ` Takashi Yano
2018-07-30 10:54       ` h_ono

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OFC009BF8B.B56C9990-ON492582D7.001F2504-492582D7.0026257B@ot.olympus.co.jp \
    --to=h_ono@ot.olympus.co.jp \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).