comp.lang.ada
 help / color / mirror / Atom feed
From: fluffy_pop@dsuper.net
Subject: Re: DOS/Win95 file names
Date: 1999/06/12
Date: 1999-06-12T00:00:00+00:00	[thread overview]
Message-ID: <3762e49c.109413162@news.dsuper.net> (raw)
In-Reply-To: FD6wMo.AM@stuyts.nl

On Sat, 12 Jun 1999 01:11:12 GMT, jerry@jvdsys.stuyts.nl wrote:

>I do not quite follow this:
>
>a) the filename has to be consistent with DOS requirements, in which case
>you should not accept filenames that are illegal under DOS, or
>
>b) you will be accepting Win32 filenames, but than there is not much sense
>in restricting the name to 8.3. 

1. more than 12 characters total => ERROR
2. more than 8 characters before the period => ERROR
3. more than one period => ERROR
4. no period => ERROR
5. illegal characters : those that are illegal under Windows only

So it validates the name following DOS rules except for the illegal
characters where it will allow '[', ']', '=', '+', ',', and ';'.

>: As it is (my program), when the user enters a file name that contains
>: an accented character, my handling of the Name_Error Exception occurs
>: to produce a message that the file is not in the repertory.
>
>If I understand this correctly, you are saying that if a filename contains
>a character, with an ASCII code > 127, you get a Name_Error exception when
>you try to create/open it ?
>
>I presume you are not using UniCode or Wide_Character ?

NO.

>: Also, when the file name contains a '?', my program
>: crashes (when what follows is a Create(F,Out_File,"name") ).
>
>Mmmm, would need to look this up, but in DOS terms, a '?' is a wildcard
>character, and would cause problems when trying to create a file (or not
>give you the file you expected when opening one).
>
>If you follow DOS rules, you should not allow a '?' in a filename. I'm not
>sure if it is allowed under Win32 rules.

'?' is not allowed under either DOS or Windows in a file name.  I have
a procedure that checks this.  That's my point.  My procedure doesn't
work right.  It validates correctly all the other conditions (those
I outlined above) except for the illegal charcter like '?'.  The point
of the validation is to prevent the program to reach the point where
it tries to create a file with a name that contains one or more
illegal characters.  In my validation procedure I sweep through a 
string containing the illegal characters, for each character of the
file name.  For some reason the '?' in the file name entered does
not get caught, as if it were not Alt+063.

I don't understand why because, like I said in one of my posts, '?'
is within the ASCII 0-127 range, where the code is the same for DOS
and for Windows.  I thought that maybe there's something else about
all this that I need to know.


Marc
--
What I really am is "fluffy", no "_dong",
no "_puff", no "_woo", no  nothing, just plain fluffy.






  parent reply	other threads:[~1999-06-12  0:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-10  0:00 DOS/Win95 file names fluffy_pop
1999-06-11  0:00 ` Gautier
1999-06-11  0:00   ` Pascal Obry
1999-06-11  0:00   ` fluffy_pop
1999-06-11  0:00     ` dennison
1999-06-11  0:00       ` fluffy_pop
1999-06-12  0:00         ` Robert Dewar
1999-06-11  0:00       ` Robert Dewar
1999-06-12  0:00 ` jerry
1999-06-12  0:00   ` Mario Klebsch
1999-06-12  0:00     ` fluffy_pop
1999-06-12  0:00   ` fluffy_pop [this message]
1999-06-13  0:00     ` fluffy_puff
1999-06-13  0:00     ` jerry
1999-06-13  0:00       ` fluffy_puff
1999-06-13  0:00         ` Matthew Heaney
1999-06-14  0:00           ` fluffy_puff
1999-06-14  0:00           ` fluffy_puff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox