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:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=ZuKwf2qFrHYKvxtW aFf+4t5y82xD4meWZNNlHmC7pP3Wda/1zdfwkq7LKA8ORNLE6DoVDUY8HT55Pu9T R6OkLmfEPk3njQVZtdliZNhtYGDWwEQoSlT+KfOZgBX6zLvWF2PQm1KqlpqPQtl4 N8XSmgeB2vyt+PK+rsIJiUH2sm0= 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:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=W8iWr/DO3l0h2vWXGkbtI9 IHpFg=; b=YdrKkme+xQ6d5ME4dXuZqrfWBon+EZZpF+do0jOpMa/axNNSnZfkiQ k5v1rn+oRh01gD83gWjI903VOV6TtyTmIXJLD4PovK6xEpZFiMAv/8ur0l1s5vmQ ad/U88o2aGAZgmnaJPwMhULGyq8Xo4+3UT5RoUEe/VrIyhoxLDMKE= 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=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= X-HELO: smtp-out-no.shaw.ca Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca Subject: Re: Command line processing in dcrt0.cc does not match Microsoft parsing rules To: "cygwin AT cygwin DOT com" References: From: Brian Inglis Openpgp: preference=signencrypt Message-ID: Date: Fri, 30 Aug 2019 21:58:40 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes On 2019-08-30 14:59, Stephen Provine wrote: >> Cygwin command line parsing has to match Unix shell command line processing, >> like argument splitting, joining within single or double quotes or after a >> backslash escaped white space characters, globbing, and other actions normally >> performed by a shell, when any Cygwin program is invoked from any Windows >> program e.g. cmd, without those Windows limitations which exclude any use of a >> backslash escape character except preceding another or a double quote. > I guess my assumption was that the "winshell" parameter would be used to determine > when a Cygwin process is called from a non-Cygwin process and that it would be more > appropriate to use standard Windows command line processing (as limiting as it may > be) in that case. Once in the Cygwin environment, calls from one process to another > should obviously process command lines according to Unix shell rules. Not being in the same Cygwin process group and lacking the appropriate interface info indicates that the invoker was not Cygwin. Cygwin command line file name globs can include any UTF-8 character excluding forward and backward (for Windows compatibility) oblique slashes and nulls, with non-Windows supported characters including leading and trailing spaces and dots, and result in thousands of file name arguments on the command line e.g. $ echo /var/log/* | wc -lwmcL 1 66858 2903078 2903078 2903077 shows I need to clean up my /var/log directory as it contains 64K+ files with names totalling 2234498 chars/bytes, plus 668579 for paths and spaces, plus a newline terminator. Some file names with non-Windows supported characters have them converted to the UTF-16LE BMP PUA by adding xf000, or for characters not supported by non-UTF-8 interface encodings, ^X CAN x18 followed by a BMP UTF-8 sequence, allowing conversion to UTF-16LE, at the cost of weird characters in the displayed names. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. -- 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