From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 58431 invoked by alias); 10 Feb 2017 21:54:49 -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 58418 invoked by uid 89); 10 Feb 2017 21:54:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=expands, Andre, andre X-HELO: mail-oi0-f42.google.com Received: from mail-oi0-f42.google.com (HELO mail-oi0-f42.google.com) (209.85.218.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 10 Feb 2017 21:54:38 +0000 Received: by mail-oi0-f42.google.com with SMTP id u143so28493646oif.3 for ; Fri, 10 Feb 2017 13:54:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=dk0rIeO0HqZ0svB8nX0ulXQeMgXlHWJBxd4UDJSPmOA=; b=i5rriJ95Fz3NRR5oo2M5B/mgZIEVXyfwRaEblUuFwu1Og/gUar08Nbv0M8SUwX5q2G 3rqtlOXHThkNDi6/TO+apaZ2opdc1fzIK/rKmAhS0v/dkQ8Xd0YFIgclnAeynk8epZ96 OYzvrrWvNXtjUvGO687q+XNPUvpr6fLG3nWTj2b8CqTxBvoNXa1AHboPSCf3wANWv3pJ cxOPC2e0dy4EjoBalLsrSqX8LslFYbwxfpRyNh1jWiwag3lqQe8v+z3cCe1PJolDK2Ch Ceb53I00x9N+aVVW1YMEHpisg/zNyR3M6y2OH7C/dAZkC/opcn7q7yOi9oWnx8HESJkv Ccfg== X-Gm-Message-State: AMke39lgESwEKdzqM0T1+BJ/Qg58GFrjywOCGUoEGYpAWRfshCWna8Ic1ojNyOQX13GSpiLGo61U1rTmurqMyQ== X-Received: by 10.202.69.130 with SMTP id s124mr5932489oia.17.1486763676521; Fri, 10 Feb 2017 13:54:36 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.12.166 with HTTP; Fri, 10 Feb 2017 13:54:36 -0800 (PST) In-Reply-To: <91DCAC3CB99C724EB365BB64677FBE7B139C41@MX204CL04.corp.emc.com> References: <91DCAC3CB99C724EB365BB64677FBE7B139A86@MX204CL04.corp.emc.com> <151946397.20170210223617@yandex.ru> <91DCAC3CB99C724EB365BB64677FBE7B139AF9@MX204CL04.corp.emc.com> <126350824.20170211003439@yandex.ru> <91DCAC3CB99C724EB365BB64677FBE7B139C41@MX204CL04.corp.emc.com> From: Michael Enright Date: Fri, 10 Feb 2017 21:54:00 -0000 Message-ID: Subject: Re: cygpath To: cygwin@cygwin.com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg00144.txt.bz2 On Fri, Feb 10, 2017 at 1:46 PM, Gluszczak, Glenn wrote: > I suppose the glob explanation from Michael explains this behavior in sh. > Though unsupported, it seems to work (probably some side cases do not). It seems to me that the behavior is supported and working. Bash or sh takes an unescaped argument /usr/bin/* and expands it to a list of names, which it provides as an array of arguments to the called program, cygpath in this case. Then cygpath converts each and outputs each result. If the user escapes the argument in someway, the asterisk survives and is treated as a Unix file name character. If there is no glob expansion, in the case of the unescaped argument /usr/nonexistent/* for example, Bash only passes one argument, and the asterisk in that is treated as a filename character. I think when the output to your terminal is weird, it is because of locale settings or code pages that either hide or garble the output of the unicode character. When the output is piped to od as Andre does, the output is clearly the UTF8 byte sequence for U+F02A. -- 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