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:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=BFqkqxgiyZ4x1zEx EBgld2iQHh9VVpOPZQ9idnNIr+VAkPmLi7b3xoquteLn86GP9xDNHO7ZXydcDMzX CY/w/lh9C4zHARmamaco/YoxnemC3KwMBtxm40TelOU1DD4tKAv7QzKZFuLTcg+w UDa8+mN02AF3lAKsUU3qZru6i3k= 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:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=default; bh=d+J5DTH+RxiLNW3HKyq3+L uqTyI=; b=Lq0cSHbblxww5ex8gC11gLnMtKvwp80Od74p+iMREs8Kkuu5ez9p9y yrGJvLrqBxXxkX3xe7JE5wEVDp8tuCyJN9YwwZk4PgzvPO+kLHicxe3We9AiImGC MGfa3D8ZLBIXZTuwyy8oM9wG3NqBuOISGHtUXM7bqFmPYKvq9O63k= 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: Yes, score=5.2 required=5.0 tests=BAYES_40,BODY_8BITS,FREEMAIL_FROM,GARBLED_BODY,KAM_THEBAT,MIME_BASE64_BLANKS,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=sk:h_onoo, h_onootolympuscojp, D*ot.olympus.co.jp, D*olympus.co.jp X-HELO: forward101p.mail.yandex.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1532667902; bh=uWIbUcgmEpXE1mSaoPlqlTYy/qGV3gFcooBBGnyu+sc=; h=Date:From:Reply-To:Message-ID:To:Subject:In-Reply-To:References; b=KIiWueGvm9iy/Gj9xpJKdePLadID7J/qtMoCk9zXc2radBxg4GUFFc7BL0y9Dpf8N wtxIuPoMwiNGsbruPz0L71hZLodrZEEsT46qzLO8GGnGbDz3MA2sK3PTL1pmQcvQRg xIqVb6gzxiklltmx7KHNNQNkDrDzYd7J6pV4qzvk= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1532667900; bh=uWIbUcgmEpXE1mSaoPlqlTYy/qGV3gFcooBBGnyu+sc=; h=Date:From:Reply-To:Message-ID:To:Subject:In-Reply-To:References; b=AXgR6LdW3hrkifLOjWcH1SF6T0tXArf4YxSl/ooquZ2w5sT5XP82uVj+0SWarp3FZ N/bHmOZDBPXnymwkylxGBhhkJFmA025BtIEWKNEVWdeLzwfUzSZ9KfT4+EWJ75uh9L kcduI/GmQXCR9RWdsGIQrVdKhNR6S3AwCsdbQVzE= Authentication-Results: smtp2o.mail.yandex.net; dkim=pass header.i=@yandex.ru Date: Fri, 27 Jul 2018 07:59:12 +0300 From: Andrey Repin Reply-To: cygwin AT cygwin DOT com Message-ID: <1734760903.20180727075912@yandex.ru> To: h_ono AT ot DOT olympus DOT co DOT jp, cygwin AT cygwin DOT com Subject: Re: cmd.exe and file name conversion from comman line argument In-Reply-To: References: MIME-Version: 1.0 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 w6R55IGg019937 Greetings, h_ono AT ot DOT olympus DOT co DOT jp! > Hello, > There is strange behavior when naming a file from command line argument in > cmd.exe cosole, > using touch or mv. No, your comparison is not fair. > I use: > touch (GNU coreutils) 8.26 > Packaged by Cygwin (8.26-2) You're using "env" to begin with, which alters processing of parameters. But I can't reproduce your case. The result is definitely does not contain the quotes. chcp 65001 set LANG=ru_RU.UTF-8 env LANG=ja_JP.UTF-8 touch 'あああ' It creates exactly the name I'd expect, even though I can't see it in console. But Explorer don't lie and shows it proper. > cygwin1.dll version 2.10.0 > in cmd.exe, doing >> touch aaa > and >> touch 'aaa' > give same file name aaa. >> ls > aaa > but, when I use Japanese characters as file name, it gives different file > names > with and without the quote. >> env LANG=ja_JP.UTF-8 touch あああ > gives >> env LANG=ja_JP.UTF-8 ls > あああ > but, >> env LANG=ja_JP.UTF-8 touch 'あああ' > gives file name with quote not stripped. >> env LANG=ja_JP.UTF-8 ls > 'あああ' > If called from mintty + bash, > $ env LANG=ja_JP.UTF-8 touch 'あああ' > gives > $ env LANG=ja_JP.UTF-8 ls > あああ > The problem is when I create a file containing spaces in its name. > Creating a file in cmd.exe like: >> env LANG=ja_JP.UTF-8 touch 'ああ あ' > gives >> env LANG=ja_JP.UTF-8 ls > "'ああ あ'" > (which is a file named 'ああ あ', not ああ あ) > It seems, there is no way to create a file containing a space in its name, > like > ああ あ > with commands such as touch or mv. > Is it a normal behavior, or a bug? > Is there any way to create a file containing Japanese characters and > spaces in its name > without quote added? > FYI, With old cygwin (cygwin1.dll version 1.5.25), there were not such > problem. > Even from cmd.exe, >> touch 'ああ あ' > gave a file named 'ああ あ' (without the quote in real.) -- With best regards, Andrey Repin Friday, July 27, 2018 7:50:49 Sorry for my terrible english... -- 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