delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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 |
Message-ID: | <3D3C30CE.700@scytek.de> |
Date: | Mon, 22 Jul 2002 18:20:30 +0200 |
From: | Volker Quetschke <quetschke AT scytek DOT de> |
User-Agent: | Mozilla/5.0 (Windows; U; Win98; de-DE; rv:0.9.4) Gecko/20011019 Netscape6/6.2 |
X-Accept-Language: | de-DE |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Valid file-name characters |
References: | <000601c23161$55d02bd0$0200a8c0 AT lifelesswks> <193351029193 DOT 20020722134800 AT logos-m DOT ru> <20020722142830 DOT GA4122 AT redhat DOT com> |
Hi! Comments below. >>>>RC> I was just about to suggest that whatever character is used is used as >>>>RC> an escape char rather than a literal replacement. >>>> >>>>RC> i.e. >>>>RC> WIN32 CYGWIN >>>>'aux%c' ->> 'aux:' >>>>'aux%%' ->> 'aux%' >>>> >>>>which means that >>>> >>>>s='a%%' >>>>touch $s >>>>notepad $s >>>> >>>>won't work. >>>> >>RC> Unless cygwin detects that notepad is a non cygwin program, and therefor >>RC> needs the on-disk name. >> >>Even if cygwin knows that notepad is native program it can't tell for >>sure if a%% is name of disk file. It may be a name of my dog to be >>told from my computer speakers, for instance. An he surely won't like >>if i misspell his name ;-) >> >>RC> With >>'aux%' ->> 'aux:' >> >>RC> s='aux:' >>RC> touch $s >>RC> notepad $s >> >>RC> won't work either - unless cygwin detects that notepad... >> >>That's exactly my point. Having some fancy rules for filename encoding >>breaks interoperability with native tools. Escaping non-valid >>characters like ':' is not big problem, since native tools can't use >>such names anyway. But messing with valid characters like '%' is far >>more dangerous and error-prone. Yes, but what about using %CYGWINREPLACESEQUENCE_FOR_COLON% instead of ':' ? Then touch "aux:" would generate aux: for cygwin programs and native windows programs would see: aux%CYGWINREPLACESEQUENCE_FOR_COLON% as a filename. The propability that someone wanted to generate a windows filename with a name similar to a cygwin created special name is much less when we use many characters to escape the single character ':' . For windows programs the user could use something like: $ s='aux:' $ touch $s $ notepad `cygpath -w $s` > Thanks Egor. That's precisely why I have always avoided this kind > of filename munging in Cygwin. Yes, but it would be very nice to have this functionality. Bye Volker -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |