public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Valid file-name characters
@ 2002-07-20 12:54 David A. Cobb
  2002-07-20 14:11 ` Nicholas Wourms
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: David A. Cobb @ 2002-07-20 12:54 UTC (permalink / raw)
  To: Cygwin Discussion

Back in May (where I'm still trying to catch up) there was a discussion 
starting at http://www.cygwin.com/ml/cygwin/2002-05/msg01041.html 
concerning a colon in a filename -- valid in *nix, not in Windows.  

Also, we get repeated griping about the encoding of URI's in the local 
package cache.  

Would you consider a patch that translated filenames containing special 
characters: the Cygwin user would see "aux:" but Windows would see 
"aux%??" (I don't recall the encoding of colon)?

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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Valid file-name characters
  2002-07-20 12:54 Valid file-name characters David A. Cobb
@ 2002-07-20 14:11 ` Nicholas Wourms
  2002-07-22  0:26 ` Gary R. Van Sickle
  2002-07-22  1:52 ` egor duda
  2 siblings, 0 replies; 23+ messages in thread
From: Nicholas Wourms @ 2002-07-20 14:11 UTC (permalink / raw)
  To: David A. Cobb, Cygwin Discussion


--- "David A. Cobb" <superbiskit@cox.net> wrote:
> Back in May (where I'm still trying to catch up) there was a discussion 
> starting at http://www.cygwin.com/ml/cygwin/2002-05/msg01041.html 
> concerning a colon in a filename -- valid in *nix, not in Windows.  
> 
> Also, we get repeated griping about the encoding of URI's in the local 
> package cache.  
> 
> Would you consider a patch that translated filenames containing special 
> characters: the Cygwin user would see "aux:" but Windows would see 
> "aux%??" (I don't recall the encoding of colon)?
> 

That sounds awesome, just like symlinks!

Cheers,
Nicholas

__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* RE: Valid file-name characters
  2002-07-20 12:54 Valid file-name characters David A. Cobb
  2002-07-20 14:11 ` Nicholas Wourms
@ 2002-07-22  0:26 ` Gary R. Van Sickle
  2002-07-22  1:52 ` egor duda
  2 siblings, 0 replies; 23+ messages in thread
From: Gary R. Van Sickle @ 2002-07-22  0:26 UTC (permalink / raw)
  To: Cygwin Discussion

> Back in May (where I'm still trying to catch up) there was a discussion
> starting at http://www.cygwin.com/ml/cygwin/2002-05/msg01041.html
> concerning a colon in a filename -- valid in *nix, not in Windows.
>
> Also, we get repeated griping about the encoding of URI's in the local
> package cache.
>
> Would you consider a patch that translated filenames containing special
> characters: the Cygwin user would see "aux:" but Windows would see
> "aux%??" (I don't recall the encoding of colon)?
>

This would allow mh and maildir mailboxes to work fully in mutt etc.  As long as
it would cause no problems with anything else, I don't see why not.

--
Gary R. Van Sickle
Brewer.  Patriot.


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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Valid file-name characters
  2002-07-20 12:54 Valid file-name characters David A. Cobb
  2002-07-20 14:11 ` Nicholas Wourms
  2002-07-22  0:26 ` Gary R. Van Sickle
@ 2002-07-22  1:52 ` egor duda
  2002-07-22  2:52   ` Nicholas Wourms
  2002-07-22 17:57   ` David A. Cobb
  2 siblings, 2 replies; 23+ messages in thread
From: egor duda @ 2002-07-22  1:52 UTC (permalink / raw)
  To: David A. Cobb; +Cc: cygwin

Hi!

Saturday, 20 July, 2002 David A. Cobb superbiskit@cox.net wrote:

DAC> Back in May (where I'm still trying to catch up) there was a discussion 
DAC> starting at http://www.cygwin.com/ml/cygwin/2002-05/msg01041.html 
DAC> concerning a colon in a filename -- valid in *nix, not in Windows.  

DAC> Also, we get repeated griping about the encoding of URI's in the local 
DAC> package cache.  

DAC> Would you consider a patch that translated filenames containing special 
DAC> characters: the Cygwin user would see "aux:" but Windows would see 
DAC> "aux%??" (I don't recall the encoding of colon)?

The only problem here is what to do if cygwin user wants to create
both aux: and aux%

Egor.            mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19


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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Valid file-name characters
  2002-07-22  1:52 ` egor duda
@ 2002-07-22  2:52   ` Nicholas Wourms
  2002-07-22  4:47     ` Robert Collins
  2002-07-22 17:57   ` David A. Cobb
  1 sibling, 1 reply; 23+ messages in thread
From: Nicholas Wourms @ 2002-07-22  2:52 UTC (permalink / raw)
  To: David A. Cobb; +Cc: cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 1485 bytes --]


--- egor duda <deo@logos-m.ru> wrote:
> Hi!
> 
> Saturday, 20 July, 2002 David A. Cobb superbiskit@cox.net wrote:
> 
> DAC> Back in May (where I'm still trying to catch up) there was a
> discussion 
> DAC> starting at http://www.cygwin.com/ml/cygwin/2002-05/msg01041.html 
> DAC> concerning a colon in a filename -- valid in *nix, not in Windows. 
> 
> 
> DAC> Also, we get repeated griping about the encoding of URI's in the
> local 
> DAC> package cache.  
> 
> DAC> Would you consider a patch that translated filenames containing
> special 
> DAC> characters: the Cygwin user would see "aux:" but Windows would see 
> DAC> "aux%??" (I don't recall the encoding of colon)?
> 
> The only problem here is what to do if cygwin user wants to create
> both aux: and aux%

Use the euro symbol (€)[Alt+0128] instead?  It is highly unlikely that a
user will want to create aux€.  Anyhow, I believe all versions of windows
(via windows update if necessary) have support for the €.

Cheers,
Nicholas

P.S. - This is not intended to start a war on the merits of the euro as a
currancy, rather it is to discuss the merits of an unused symbol.

__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* RE: Valid file-name characters
  2002-07-22  2:52   ` Nicholas Wourms
@ 2002-07-22  4:47     ` Robert Collins
  2002-07-22  5:07       ` egor duda
  0 siblings, 1 reply; 23+ messages in thread
From: Robert Collins @ 2002-07-22  4:47 UTC (permalink / raw)
  To: 'Nicholas Wourms', 'David A. Cobb'; +Cc: cygwin



> -----Original Message-----
> From: cygwin-owner@cygwin.com 
> [mailto:cygwin-owner@cygwin.com] On Behalf Of Nicholas Wourms
> Sent: Monday, 22 July 2002 5:47 PM
> To: David A. Cobb
> Cc: cygwin@cygwin.com
> Subject: Re: Valid file-name characters
> 
> 
> 
> --- egor duda <deo@logos-m.ru> wrote:
> > Hi!
> > 
> > Saturday, 20 July, 2002 David A. Cobb superbiskit@cox.net wrote:
> > 
> > DAC> Back in May (where I'm still trying to catch up) there was a
> > discussion 
> > DAC> starting at 
> http://www.cygwin.com/ml/cygwin/2002-> 05/msg01041.html 
> > DAC> 
> concerning a colon in a filename -- 
> valid in *nix, not in Windows. 
> > 
> > 
> > DAC> Also, we get repeated griping about the encoding of 
> URI's in the
> > local 
> > DAC> package cache.  
> > 
> > DAC> Would you consider a patch that translated filenames containing
> > special 
> > DAC> characters: the Cygwin user would see "aux:" but 
> Windows would see 
> > DAC> "aux%??" (I don't recall the encoding of colon)?
> > 
> > The only problem here is what to do if cygwin user wants to create
> > both aux: and aux%
> 
> Use the euro symbol (€)[Alt+0128] instead?  It is highly 
> unlikely that a
> user will want to create aux€.  Anyhow, I believe all 
> versions of windows
> (via windows update if necessary) have support for the €.

I was just about to suggest that whatever character is used is used as
an escape char rather than a literal replacement.

i.e. 
WIN32      CYGWIN
'aux%c' -> 'aux:'
'aux%%' -> 'aux%'

Cheers,
Rob 


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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Valid file-name characters
  2002-07-22  4:47     ` Robert Collins
@ 2002-07-22  5:07       ` egor duda
  2002-07-22  7:05         ` Robert Collins
  0 siblings, 1 reply; 23+ messages in thread
From: egor duda @ 2002-07-22  5:07 UTC (permalink / raw)
  To: Robert Collins; +Cc: 'David A. Cobb', cygwin

Hi!

Monday, 22 July, 2002 Robert Collins robert.collins@syncretize.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.

Egor.            mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19


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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* RE: Valid file-name characters
  2002-07-22  5:07       ` egor duda
@ 2002-07-22  7:05         ` Robert Collins
  2002-07-22  7:07           ` egor duda
  0 siblings, 1 reply; 23+ messages in thread
From: Robert Collins @ 2002-07-22  7:05 UTC (permalink / raw)
  To: 'egor duda'; +Cc: 'David A. Cobb'



> -----Original Message-----
> From: egor duda [mailto:deo@logos-m.ru] 
> Sent: Monday, 22 July 2002 6:07 PM
> To: Robert Collins
> Cc: 'David A. Cobb'; cygwin@cygwin.com
> Subject: Re: Valid file-name characters
> 
> 
> Hi!
> 
> Monday, 22 July, 2002 Robert Collins 
> robert.collins@syncretize.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.

Unless cygwin detects that notepad is a non cygwin program, and therefor
needs the on-disk name.

With 
'aux%' -> 'aux:'

s='aux:'
touch $s
notepad $s

won't work either - unless cygwin detects that notepad...

Rob


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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Valid file-name characters
  2002-07-22  7:05         ` Robert Collins
@ 2002-07-22  7:07           ` egor duda
  2002-07-22  7:36             ` Max Bowsher
                               ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: egor duda @ 2002-07-22  7:07 UTC (permalink / raw)
  To: Robert Collins; +Cc: cygwin, 'David A. Cobb'

Hi!

Monday, 22 July, 2002 Robert Collins robert.collins@syncretize.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@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19


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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Valid file-name characters
  2002-07-22  7:07           ` egor duda
@ 2002-07-22  7:36             ` Max Bowsher
  2002-07-22  7:39               ` Sylvain Petreolle
  2002-07-22  9:14             ` Christopher Faylor
  2002-07-22 18:19             ` David A. Cobb
  2 siblings, 1 reply; 23+ messages in thread
From: Max Bowsher @ 2002-07-22  7:36 UTC (permalink / raw)
  Cc: cygwin

egor duda wrote:
> 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.

OK, so we need to think long and hard before picking an escape character. But
surely bypassing Windows's invalid characters in filenames is worth problems in
the extremely rare corner case that filenames contain whichever weird character
we pick?

Max.


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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Valid file-name characters
  2002-07-22  7:36             ` Max Bowsher
@ 2002-07-22  7:39               ` Sylvain Petreolle
  0 siblings, 0 replies; 23+ messages in thread
From: Sylvain Petreolle @ 2002-07-22  7:39 UTC (permalink / raw)
  To: Max Bowsher; +Cc: cygwin

Be aware of % in filenames.
Bad minded people could create a %COMSPEC% file...

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Valid file-name characters
  2002-07-22  7:07           ` egor duda
  2002-07-22  7:36             ` Max Bowsher
@ 2002-07-22  9:14             ` Christopher Faylor
  2002-07-22 11:13               ` Volker Quetschke
  2002-07-22 18:19             ` David A. Cobb
  2 siblings, 1 reply; 23+ messages in thread
From: Christopher Faylor @ 2002-07-22  9:14 UTC (permalink / raw)
  To: cygwin

On Mon, Jul 22, 2002 at 01:48:00PM +0400, egor duda wrote:
>Hi!
>
>Monday, 22 July, 2002 Robert Collins robert.collins@syncretize.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.

Thanks Egor.  That's precisely why I have always avoided this kind
of filename munging in Cygwin.

cgf

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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Valid file-name characters
  2002-07-22  9:14             ` Christopher Faylor
@ 2002-07-22 11:13               ` Volker Quetschke
  0 siblings, 0 replies; 23+ messages in thread
From: Volker Quetschke @ 2002-07-22 11:13 UTC (permalink / raw)
  To: cygwin

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/

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Valid file-name characters
  2002-07-22  1:52 ` egor duda
  2002-07-22  2:52   ` Nicholas Wourms
@ 2002-07-22 17:57   ` David A. Cobb
  2002-07-22 22:42     ` Randall R Schulz
  1 sibling, 1 reply; 23+ messages in thread
From: David A. Cobb @ 2002-07-22 17:57 UTC (permalink / raw)
  To: egor duda, Cygwin Discussion

egor duda wrote:

>Hi!
>
>Saturday, 20 July, 2002 David A. Cobb superbiskit@cox.net wrote:
>
>DAC> Back in May (where I'm still trying to catch up) there was a discussion 
>DAC> starting at http://www.cygwin.com/ml/cygwin/2002-05/msg01041.html 
>DAC> concerning a colon in a filename -- valid in *nix, not in Windows.  
>
>DAC> Also, we get repeated griping about the encoding of URI's in the local 
>DAC> package cache.  
>
>DAC> Would you consider a patch that translated filenames containing special 
>DAC> characters: the Cygwin user would see "aux:" but Windows would see 
>DAC> "aux%??" (I don't recall the encoding of colon)?
>
>The only problem here is what to do if cygwin user wants to create
>both aux: and aux%
>
>Egor.            mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19
>
"aux%3A" and "aux%25" respectively.  [ I did my homework, finally ]   
More problematical: if a user _enters_ NameWith%3CEscapes%3E,  should 
the program translate the escapes and try to use "NameWith<Escapes>", 
should it pass the user's string unchanged [my vote], or should it 
escape the '%' marks resulting in "NameWith%253CEscapes%253E" which is 
nearly too ugly for words.  That sounds silly, but there are many web 
pages around from folks who should know better where text somehow got 
encoded twice, resulting in [Quotemark] becoming first &quot; and then 
mangled into &amp;quot;

As an interesting datapoint: I used Mozilla today to download a file 
with SPACE in the name: perfectly OK in Windoze, a pain in *Nix;
Mozilla offered to save it as "This%20is%20the%20Name"   Not a good 
example to follow, IMNSHO, but it /is/ a name valid in both worlds.

It only makes sense to me to escape characters that are a real problem ( 
vs. a nuisance ) for one system or the other.  The ones I'm sure of in 
Windoz are the colon and slashes.  Would Linux, for example, allow a 
file with (shell-escapd) backslashes?  There are others, but I haven't 
done the research yet.

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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Valid file-name characters
  2002-07-22  7:07           ` egor duda
  2002-07-22  7:36             ` Max Bowsher
  2002-07-22  9:14             ` Christopher Faylor
@ 2002-07-22 18:19             ` David A. Cobb
  2002-07-22 18:43               ` Robert Collins
  2 siblings, 1 reply; 23+ messages in thread
From: David A. Cobb @ 2002-07-22 18:19 UTC (permalink / raw)
  To: egor duda, Cygwin Discussion

egor duda wrote:

>Hi!
>
>Monday, 22 July, 2002 Robert Collins robert.collins@syncretize.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@logos-m.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 <hex-digit>.
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/

^ permalink raw reply	[flat|nested] 23+ messages in thread

* RE: Valid file-name characters
  2002-07-22 18:19             ` David A. Cobb
@ 2002-07-22 18:43               ` Robert Collins
  0 siblings, 0 replies; 23+ messages in thread
From: Robert Collins @ 2002-07-22 18:43 UTC (permalink / raw)
  To: 'Cygwin Discussion'



> -----Original Message-----
> From: cygwin-owner@cygwin.com 
> [mailto:cygwin-owner@cygwin.com] On Behalf Of David A. Cobb
> Sent: Tuesday, 23 July 2002 9:41 AM

> By the way, if noone recognized it, I'm using an internet 
> standard as a 
> model - I'm not sure of the RFC number.

RFC 1738.

Rob


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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Valid file-name characters
  2002-07-22 17:57   ` David A. Cobb
@ 2002-07-22 22:42     ` Randall R Schulz
  2002-07-23 16:16       ` David A. Cobb
  0 siblings, 1 reply; 23+ messages in thread
From: Randall R Schulz @ 2002-07-22 22:42 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 855 bytes --]

At 16:18 2002-07-22, David A. Cobb wrote:
>...
>
>It only makes sense to me to escape characters that are a real problem ( 
>vs. a nuisance ) for one system or the other.  The ones I'm sure of in 
>Windoz are the colon and slashes.  Would Linux, for example, allow a file 
>with (shell-escapd) backslashes?  There are others, but I haven't done the 
>research yet.

See the attached GIF for Windows' reproach. If you don't care to do that, 
I'll transcribe:

         A filename [sic] cannot contain any of the following characters:
         \ / : * ? < > |

If (_if_) we're voting, count my vote on this whole idea as: AGAINST.

If this change is implemented, please, please make it an option. ("Cygwin 
is not Unix.")

Needless to say (?), if this is done, "cygpath" needs to reflect it, too.


>--
>David A. Cobb


Randall Schulz
Mountain View, CA USA

[-- Attachment #2: Invalid.gif --]
[-- Type: image/gif, Size: 5798 bytes --]

[-- Attachment #3: Type: text/plain, Size: 214 bytes --]

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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Valid file-name characters
  2002-07-22 22:42     ` Randall R Schulz
@ 2002-07-23 16:16       ` David A. Cobb
  2002-07-23 17:45         ` wayne
  0 siblings, 1 reply; 23+ messages in thread
From: David A. Cobb @ 2002-07-23 16:16 UTC (permalink / raw)
  To: Randall R Schulz; +Cc: cygwin

[-- Attachment #1: Type: text/plain, Size: 1635 bytes --]



Randall R Schulz wrote:

> At 16:18 2002-07-22, David A. Cobb wrote:
>
>> ...
>>
>> It only makes sense to me to escape characters that are a real 
>> problem ( vs. a nuisance ) for one system or the other.  The ones I'm 
>> sure of in Windoz are the colon and slashes.  Would Linux, for 
>> example, allow a file with (shell-escapd) backslashes?  There are 
>> others, but I haven't done the research yet.
>
>
> See the attached GIF for Windows' reproach. If you don't care to do 
> that, I'll transcribe:

I have plenty of reproaches for them too!  Thanks, I meant to conjure up 
that box.
I'm thinking of this as the _last_ step before sending a windowized 
pathname to the OS -- encode any of the char's shown except the 
PATH-SEP.  Actually, both slashes are verboten.  Coming back the other 
way I'd be tempted to be more permissive and try decoding any %XY | X in 
{0..9+A..F), Y in (0..9+A..F) but that may be an evil temptation. 
 Reversing only what we ourselves do is far safer.

> Randall Schulz
> Mountain View, CA USA
>
> ------------------------------------------------------------------------
>
>------------------------------------------------------------------------
>
>--
>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/
>

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


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Valid file-name characters
  2002-07-23 16:16       ` David A. Cobb
@ 2002-07-23 17:45         ` wayne
  2002-07-23 17:48           ` Randall R Schulz
  0 siblings, 1 reply; 23+ messages in thread
From: wayne @ 2002-07-23 17:45 UTC (permalink / raw)
  To: cygwin

you can use an escaped \ I think that is true in all unixs at
least the modern ones.  

On Tue, Jul 23, 2002 at 04:43:28PM -0400, David A. Cobb wrote:
> 
> 
> Randall R Schulz wrote:
> 
> > At 16:18 2002-07-22, David A. Cobb wrote:
> >
> >> ...
> >>
> >> It only makes sense to me to escape characters that are a real 
> >> problem ( vs. a nuisance ) for one system or the other.  The ones I'm 
> >> sure of in Windoz are the colon and slashes.  Would Linux, for 
> >> example, allow a file with (shell-escapd) backslashes?  There are 
> >> others, but I haven't done the research yet.
> >
> >
> > See the attached GIF for Windows' reproach. If you don't care to do 
> > that, I'll transcribe:
> 
> I have plenty of reproaches for them too!  Thanks, I meant to conjure up 
> that box.
> I'm thinking of this as the _last_ step before sending a windowized 
> pathname to the OS -- encode any of the char's shown except the 
> PATH-SEP.  Actually, both slashes are verboten.  Coming back the other 
> way I'd be tempted to be more permissive and try decoding any %XY | X in 
> {0..9+A..F), Y in (0..9+A..F) but that may be an evil temptation. 
>  Reversing only what we ourselves do is far safer.
> 
> > Randall Schulz
> > Mountain View, CA USA
> >
> > ------------------------------------------------------------------------
> >
> >------------------------------------------------------------------------
> >
> >--
> >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/
> >
> 
> -- 
> 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.
> .
> 


-- 
Slowly and surely the unix crept up on the Nintendo user ...
Wayne Willcox                          I will not eat green eggs and ham
wayne@reliant.immure.com                     I will not eat them Sam I Am!!
A wise person makes his own decisions, a weak one obeys public opinion.
                -- Chinese proverb

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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Valid file-name characters
  2002-07-23 17:45         ` wayne
@ 2002-07-23 17:48           ` Randall R Schulz
  2002-07-23 18:02             ` Wayne Willcox
  0 siblings, 1 reply; 23+ messages in thread
From: Randall R Schulz @ 2002-07-23 17:48 UTC (permalink / raw)
  To: Wayne Willcox, cygwin

Wayne,

As far back as Unix v6 (for a quaint old processor called the PDP-11) the 
only characters forbidden for use in Unix path names were the slash and the 
NUL.

Just out of curiosity, are there any Unix or Unix-alike systems with 
Unicode file name support? Linux? Windows?

Randall Schulz
Mountain View, CA USA


At 14:01 2002-07-23, wayne wrote:
>you can use an escaped \ I think that is true in all unixs at least the 
>modern ones.


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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Valid file-name characters
  2002-07-23 17:48           ` Randall R Schulz
@ 2002-07-23 18:02             ` Wayne Willcox
  2002-07-24 15:45               ` Chris January
  0 siblings, 1 reply; 23+ messages in thread
From: Wayne Willcox @ 2002-07-23 18:02 UTC (permalink / raw)
  To: Randall R Schulz; +Cc: cygwin

AIX supports unicode, not sure about others though.

On Tue, Jul 23, 2002 at 03:19:28PM -0700, Randall R Schulz wrote:
> Wayne,
> 
> As far back as Unix v6 (for a quaint old processor called the PDP-11) the 
> only characters forbidden for use in Unix path names were the slash and the 
> NUL.
> 
> Just out of curiosity, are there any Unix or Unix-alike systems with 
> Unicode file name support? Linux? Windows?
> 
> Randall Schulz
> Mountain View, CA USA
> 
> 
> At 14:01 2002-07-23, wayne wrote:
> >you can use an escaped \ I think that is true in all unixs at least the 
> >modern ones.

-- 
Slowly and surely the unix crept up on the Nintendo user ...
Wayne Willcox                          I will not eat green eggs and ham
wayne@reliant.immure.com                     I will not eat them Sam I Am!!
A wise person makes his own decisions, a weak one obeys public opinion.
                -- Chinese proverb

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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Valid file-name characters
  2002-07-23 18:02             ` Wayne Willcox
@ 2002-07-24 15:45               ` Chris January
  2002-07-24 16:10                 ` Randall R Schulz
  0 siblings, 1 reply; 23+ messages in thread
From: Chris January @ 2002-07-24 15:45 UTC (permalink / raw)
  To: cygwin

> AIX supports unicode, not sure about others though.
>
> On Tue, Jul 23, 2002 at 03:19:28PM -0700, Randall R Schulz wrote:
> > Wayne,
> >
> > As far back as Unix v6 (for a quaint old processor called the PDP-11)
the
> > only characters forbidden for use in Unix path names were the slash and
the
> > NUL.
> >
> > Just out of curiosity, are there any Unix or Unix-alike systems with
> > Unicode file name support? Linux? Windows?
I don't know what you mean by Windows? here, but Windows NT/2000/XP use
native Unicode filenames. They are converted to/from ANSI as appropriate for
compatibility with programs targetted for the more crippled Windows
platforms.

Chris



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

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Valid file-name characters
  2002-07-24 15:45               ` Chris January
@ 2002-07-24 16:10                 ` Randall R Schulz
  0 siblings, 0 replies; 23+ messages in thread
From: Randall R Schulz @ 2002-07-24 16:10 UTC (permalink / raw)
  To: cygwin

Chris,

It couldn't have been that hard to interpret, could it? Anyway, you 
answered my question about whether / which Windows platforms support 
Unicode file names.

Randall Schulz
Mountain View, CA USA


At 13:12 2002-07-24, Chris January wrote:
> > AIX supports unicode, not sure about others though.
> >
> > On Tue, Jul 23, 2002 at 03:19:28PM -0700, Randall R Schulz wrote:
> > > Wayne,
> > >
> > > As far back as Unix v6 (for a quaint old processor called the PDP-11) the
> > > only characters forbidden for use in Unix path names were the slash 
> and the
> > > NUL.
> > >
> > > Just out of curiosity, are there any Unix or Unix-alike systems with
> > > Unicode file name support? Linux? Windows?
>
>I don't know what you mean by "Windows?" here, but Windows NT/2000/XP use
>native Unicode filenames. They are converted to/from ANSI as appropriate for
>compatibility with programs targetted for the more crippled Windows
>platforms.
>
>Chris


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

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2002-07-24 20:17 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-20 12:54 Valid file-name characters David A. Cobb
2002-07-20 14:11 ` Nicholas Wourms
2002-07-22  0:26 ` Gary R. Van Sickle
2002-07-22  1:52 ` egor duda
2002-07-22  2:52   ` Nicholas Wourms
2002-07-22  4:47     ` Robert Collins
2002-07-22  5:07       ` egor duda
2002-07-22  7:05         ` Robert Collins
2002-07-22  7:07           ` egor duda
2002-07-22  7:36             ` Max Bowsher
2002-07-22  7:39               ` Sylvain Petreolle
2002-07-22  9:14             ` Christopher Faylor
2002-07-22 11:13               ` Volker Quetschke
2002-07-22 18:19             ` David A. Cobb
2002-07-22 18:43               ` Robert Collins
2002-07-22 17:57   ` David A. Cobb
2002-07-22 22:42     ` Randall R Schulz
2002-07-23 16:16       ` David A. Cobb
2002-07-23 17:45         ` wayne
2002-07-23 17:48           ` Randall R Schulz
2002-07-23 18:02             ` Wayne Willcox
2002-07-24 15:45               ` Chris January
2002-07-24 16:10                 ` Randall R Schulz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).