Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Message-ID: <3D3C9810.9080401@cox.net> Date: Mon, 22 Jul 2002 19:41:04 -0400 From: "David A. Cobb" Reply-To: Cygwin Discussion Organization: CoxNet User User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1b) Gecko/20020718 X-Accept-Language: en-us, en MIME-Version: 1.0 To: egor duda , Cygwin Discussion Subject: Re: Valid file-name characters References: <000601c23161$55d02bd0$0200a8c0 AT lifelesswks> <193351029193 DOT 20020722134800 AT logos-m DOT ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit egor duda wrote: >Hi! > >Monday, 22 July, 2002 Robert Collins robert DOT collins AT syncretize DOT net wrote: > > > >>>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. > >Egor. mailto:deo AT logos-m DOT ru ICQ 5165414 FidoNet 2:5020/496.19 > Before we go too far overboard, translate from "escaped" to "real" only in the face of "%ab" where a and b are valid . That way, a user could even include the percent sign. By the way, if noone recognized it, I'm using an internet standard as a model - I'm not sure of the RFC number. I'm pretty much in favor of a very minimalist approach, and of only using it at the interface where we have a known problem. -- David A. Cobb, Software Engineer, Public Access Advocate "By God's Grace I am a Christian man, by my actions a great sinner." -- The Way of a Pilgrim; R. M. French, tr. Life is too short to tolerate crappy software. . -- 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/