Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a way to tell a binary from a text file?
Message
 
To
19/01/2001 09:43:59
Donald Krasnick
Stanton Systems and Consulting
Havertown, Pennsylvania, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00464420
Message ID:
00466053
Views:
26
>>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform