delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/02/25/11:38:56

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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=H5mvUUPd7xbFLN7I
Jkqj9KZQIYvwm2N7Z5GwEfw3/OXD52309z7+qNcvGqkcZgJlPuubsRry/iFAqb00
x8+KwzjPym5OROAXdeld0eyEdJhWJx4Hhus08xq3HY+ddZbz5WV0DosqbZtdcdSK
uku7lFtOIk9ReBKf7SUJJG1lDC0=
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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=vqcB3JB8eClz/G3busq0pa
TJ32o=; b=aJPS4qoYDnWjOU9zOMPl0dp3/nsWYBhwlp9ceCPEIL2wQK1hCTAlYA
AXxnjYTELYMxS/RCaa1C07K/+aL1Hr/siieB9uCuGGo1Rdh28ZqocJ0iB/Vpcph4
86iOZQijl9VPXiP1e0/Px9lYDpZEBU9WN6tXtirYjLToWRpWWH9JI=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:ip*192.168.0.6, fro, cyg, wondered
X-HELO: mail-io0-f172.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=hkG6LAR0lWzUn1n2ruYPyAgzbUhuk2Atcvr95az+xvE=; b=XLDdU7OFXGw4ydX+JCxXTehTB6elb96v5T0dz4m9nNi2rPUdJlEJ83Xthh5Sazdkt1 MDkcCkaZYoAOMm5gkPORMi30SffPCuk/yvlBwsxB5rB1yhn07qG5lpk7hrRVCqd7zZUA StDDYcgp+LZFKnL6U2OvpfYRdAr4+YbBlrT3vC6ZI9EnAy3DWD6SGOUQyaMKHLO7QfER V2gyby0hQ+1MFlLM30eCHnwiMHROjHttDw15quSEGQtzgr8lPFHjIeds0y0NgqGJ9/vO P8Vz5yNShuk+rEWW5WtTfHRKSDOoJtGzYm1N4elTIyqRjUohd64fzgpsoo+PpR47SyQ+ s4dg==
X-Gm-Message-State: AMke39kZJ0PWZNk8gdhkJkl581vtAIF7uQyFPCkV4kI0KMxhMBdjtqLLHIy48u0sP1Ycrw==
X-Received: by 10.107.187.133 with SMTP id l127mr7480469iof.1.1488040705988; Sat, 25 Feb 2017 08:38:25 -0800 (PST)
Subject: Re: cygpath (reprised)
To: cygwin AT cygwin DOT com
References: <0D835E9B9CD07F40A48423F80D3B5A704BBEEB39 AT USA7109MB022 DOT na DOT xerox DOT net> <198383594 DOT 20170221210252 AT yandex DOT ru> <0D835E9B9CD07F40A48423F80D3B5A704BBEEB6F AT USA7109MB022 DOT na DOT xerox DOT net>
From: cyg Simple <cygsimple AT gmail DOT com>
Message-ID: <a012307e-c235-8571-97e8-019719058366@gmail.com>
Date: Sat, 25 Feb 2017 11:38:32 -0500
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1
MIME-Version: 1.0
In-Reply-To: <0D835E9B9CD07F40A48423F80D3B5A704BBEEB6F@USA7109MB022.na.xerox.net>
X-IsSubscribed: yes

On 2/21/2017 1:22 PM, Nellis, Kenneth (Conduent) wrote:
> From: Andrey Repin 
>>> But, consider the following:
>>
>>> $ cygpath -w a:b | od -An -tx1c
>>>   41  3a  62  0a
>>>    A   :   b  \n
>>> $
>>
>>> Instead of the special character colon (:), shouldn't cygpath be showing
>>> something in the Unicode Private Use area?
>>
>> No, it shouldn't.
>> You've requested a name "b" in the current directory on the disk "A:", or
>> a file substream "b" of the file "a".
>> Both are valid system paths.
> 
> Right. Thanx. I wondered why the "a" got up-cased.
> 
> I suppose one could argue that, by using -w, that cygpath might assume that it 
> is converting *from* a POSIX path, and therefore the colon would not indicate 
> a drive letter--wouldn't that make sense?--but I’ll let someone else take up 
> that battle. ☺
> 

I would almost agree except for the help description of the -w option.
Also a : isn't a valid character for a name in Windows.  Cygwin uses
some magic to represent it in UNICODE format though.

> Also, in the following, I would expect cygpath to figure out that I *am not* 
> specifying a drive letter:
> 
> $ cygpath -w ./a:b | od -An -tx1c
>   41  3a  62  0a
>    A   :   b  \n
> $
> 

Consider the following as what should happen with "./a:b" but the
current result of  "a:b" could already be considered correct.  With the
following I think the output give fro "./a:b" is incorrect.  Not
withstanding the argument for relational output of the windows path.

$ cygpath -w ../a:b | od -An -tx1c
  43  3a  5c  6f  70  74  5c  63  79  67  77  69  6e  36  34  5c
   C   :   \   o   p   t   \   c   y   g   w   i   n   6   4   \
  68  6f  6d  65  5c  61  ef  80  ba  62  0a
   h   o   m   e   \   a 357 200 272   b  \n

-- 
cyg Simple

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019