Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is there a way to tell a binary from a text file?
Message
 
À
19/01/2001 09:43:59
Donald Krasnick
Stanton Systems and Consulting
Havertown, Pennsylvanie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00464420
Message ID:
00466053
Vues:
27
>>>Is there a way to read a file type? i.e if I expect to receive coma delimited files and get a spreadsheet instead, is there anyway to tell?
>>>
>>>Thanks
>>
>>If it a true ascii text file then each row will end with a CHR(13)+CHR(10) and,
>>on DOS systems, the file ends with a control-Z, CHR(26).
>>JLK
>
>Technically, not true. DOS "text" files (created with EDIT, e.g.) will have CHR(13)/CHR(10) on each line, but won't end with a CHR(26). Unix files, though, will typically have just a CHR(10) at the end of each line.
>
>Don

I just knew somebody would reply to that.
Technically, TRUE. I think you are wrong.
By definition, any file that displays on the terminal is an ASCII text file IF the lines don't overlap each other.... i.e, a CHR(13) alone or a CHR(10) alone won't cut it. And, typically, Control-Z is used to end and close such files in most old ASCII editors. Since we are a VFP form and VFP still doesn't run on Unix systems the Unix ASCII definition is not relevent. IMO.
Nebraska Dept of Revenue
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform