From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 123628 invoked by alias); 22 Mar 2018 21:05:53 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 123596 invoked by uid 89); 22 Mar 2018 21:05:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.4 required=5.0 tests=BAYES_00,BODY_8BITS,FREEMAIL_FROM,GARBLED_BODY,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 spammy=UD:mail.ru, downloads, UD:ru, H*u:6.1 X-HELO: smtp3.mail.ru Received: from smtp3.mail.ru (HELO smtp3.mail.ru) (94.100.179.58) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 22 Mar 2018 21:05:50 +0000 Received: by smtp3.mail.ru with esmtpa (envelope-from ) id 1ez7P9-0004mz-3d for cygwin@cygwin.com; Fri, 23 Mar 2018 00:05:47 +0300 Received: from [192.168.1.85] (Furia.home [192.168.1.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by centurion.home (Postfix) with ESMTPSA id 55513D31CCD for ; Thu, 22 Mar 2018 22:05:44 +0100 (CET) Subject: Re: Quotes around command-line argument that has unicode characters are not removed To: cygwin@cygwin.com References: <08d9621d-b9a0-c0d7-b58b-581ab957a08c@mail.ru> <1547310513.20180322142446@yandex.ru> From: "Dmitry Katsubo via cygwin" Reply-To: Dmitry Katsubo Message-ID: <0986bb16-42ed-924f-598f-84c3b8ce8997@mail.ru> Date: Thu, 22 Mar 2018 21:14:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1547310513.20180322142446@yandex.ru> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Authentication-Results: smtp3.mail.ru; auth=pass smtp.auth=dma_k@mail.ru smtp.mailfrom=dma_k@mail.ru X-7FA49CB5: 0D63561A33F958A51E00D3D5AF0B9CA81A8FD8356C711E05F051C31AE2E87B56725E5C173C3A84C321259270BBF67A209133670C47C8CD571D6A3D1828C12CDEC4224003CC836476C0CAF46E325F83A50BF2EBBBDD9D6B0F05F538519369F3743B503F486389A921A5CC5B56E945C8DA X-Mailru-Sender: 6DAAA20F2058E07D134D6D8D77B89E7F26394FDD22EB44418089A98F7E68F940C9E3AB9ECB1E5BFA501E7C294F69090ED50E20E2BC48EF5AE609D43F356B221EEAB4BC95F72C04283CDA0F3B3F5B9367 X-IsSubscribed: yes X-SW-Source: 2018-03/txt/msg00357.txt.bz2 On 2018-03-22 12:24, Andrey Repin wrote: > > This is not cygwin, this is bare Windows. This is executable linked against cygwin1.dll. I personally call such binaries "Cygwin programs". However it is run from Windows. > Parameter unquoting done by the shell. > CMD does that differently from POSIX shells. CMD does nothing when you execute a program from it. Command-line is passed literally. I've download procmon.exe [1] and filtered by process name "cmd.exe". When I run D:\cli> test abc "текст\" плюс.txt" (suppose that CMD will at least remove backslashes) I see the following in the log: test abc "текст\" плюс.txt" [1] https://docs.microsoft.com/en-us/sysinternals/downloads/procmon -- With best regards, Dmitry -- 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