X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:in-reply-to:references:to:mime-version:subject :message-id:from:date:content-type:content-transfer-encoding; q= dns; s=default; b=juJfQUGn/vGDrRXLDiCcc9UXhBMpa4gsveb7k+uqvpAwQI 7eYT0mf5I/Wsy5F5WGkQZu46ZH2DP1SJ/T4YvokCBhCMdV3EDM4+zUC4f7TFweg5 NjDwR40NrvheMCHequsUD2HkKAQA7W4WYg+2FN75OpZRbfMGYoWDOhH8GIxkM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:in-reply-to:references:to:mime-version:subject :message-id:from:date:content-type:content-transfer-encoding; s= default; bh=d5F3GsBtpncXtIGNP+iyWayaygE=; b=YLOhDIr7ZsHn/5HZSuTn 5blaEtNl7qkiGfTjFfcQjndFOFC3tTBYG0gDUtQmf+aeGBMIIF0zT0Rnxo0xGAQy olpBs911dL4cuV3Rug/DYORfVnWJy5weHdpLBYFXsfQh71EiMJl6Z1SRaSva6IKy n0NvUm9yhq6Tr2UmagRstuU= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=1.1 required=5.0 tests=AWL,BAYES_00,BODY_8BITS,CYGWIN_OWNER_BODY,GARBLED_BODY,GIT_PATCH_2,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 spammy=cygwinownercygwincom, cygwin-owner AT cygwin DOT com, U*cygwin-owner, redirection X-HELO: inmx21.olympus.co.jp In-Reply-To: <950baa09-f613-334e-7f27-b0cad8ba9d14@SystematicSw.ab.ca> References: <950baa09-f613-334e-7f27-b0cad8ba9d14 AT SystematicSw DOT ab DOT ca> To: cygwin AT cygwin DOT com MIME-Version: 1.0 Subject: Re: cmd.exe and file name conversion from comman line argument X-KeepSent: C009BF8B:B56C9990-492582D7:001F2504; type=4; name=$KeepSent Message-ID: From: h_ono AT ot DOT olympus DOT co DOT jp Date: Fri, 27 Jul 2018 15:56:39 +0900 Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id w6R6uvbm027011 Thank you > From: Marco Atzeri > 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 > To: cygwin AT cygwin DOT com > Date: 2018/07/27 14:25 > Subject: Re: cmd.exe and file name conversion from comman line argument > Sent by: cygwin-owner AT cygwin DOT 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 -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple