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 10:16:00 -0000	[thread overview]
Message-ID: <OF383DF3D0.4F2F25B6-ON492582D7.0031D6A7-492582D7.0032DAE2@ot.olympus.co.jp> (raw)
In-Reply-To: <OFC009BF8B.B56C9990-ON492582D7.001F2504-492582D7.0026257B@ot.olympus.co.jp>

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

> 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

\0ТÒÐÐ¥\a&ö&ÆVÒ\a&W\x06÷'G3¢\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒ÷\a&ö&ÆV×2æ‡FÖÀФd\x15\x13¢\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöf\x17\x12ðФFö7VÖVçF\x17F–öã¢\x02\x02\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöFö72æ‡FÖÀÐ¥Vç7V'67&–&R\x06–æfó¢\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöÖÂò7Vç7V'67&–&R×6–×\x06ÆPРÐ

  reply	other threads:[~2018-07-27  9:15 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
2018-07-27 10:16     ` h_ono [this message]
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=OF383DF3D0.4F2F25B6-ON492582D7.0031D6A7-492582D7.0032DAE2@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).