From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3accd44abeec75ee X-Google-Attributes: gid103376,public From: jerry@jvdsys.stuyts.nl Subject: Re: DOS/Win95 file names Date: 1999/06/12 Message-ID: #1/1 X-Deja-AN: 488623302 Sender: jerry@stuyts.nl (Jerry van Dijk) References: <375fd4b4.608956077@news.dsuper.net> Organization: * JerryWare HQ *, Leiden, Holland User-Agent: tin/pre-1.4-980226 (UNIX) (Linux/2.2.9 (i586)) Newsgroups: comp.lang.ada Date: 1999-06-12T00:00:00+00:00 List-Id: fluffy_pop@dsuper.net wrote: : I'm being asked to validate the name format so that it satisfies the : (8.3) DOS requirements (actually it's a hybrid because I'm accepting : characters illegal under DOS but legal under Windows). It's a Ada : console program and I'm working on a Win95 machine. 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. : 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 ? : 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. : characters of the real file names, since I'm working under Windows : when I write my program code and the files are created also under : Windows or DOS. If you want your files to work with both DOS and Windows, you have no option but to stick to the DOS filename format, and not allow any Win32 extensions. -- -- Jerry van Dijk | Leiden, Holland -- Team Ada | jdijk@acm.org -- see http://stad.dsl.nl/~jvandyk