How to find out if a file contains binary or ascii data?
How to find out if a file contains binary or ascii data?
How do i go about finding out if a file contains binary or ascii data? i.e. is there a way to find out if a file is a binary other than the extension?
Re: How to find out if a file contains binary or ascii data?
There is no way, because a ASCII-File IS a binary file and has no header.Kale wrote:How do i go about finding out if a file contains binary or ascii data? i.e. is there a way to find out if a file is a binary other than the extension?
All Files are Binary-Files, but some has headers, for example EXE,BMP,etc. other has none.
When i know it right, on linux has all files a header, but not on windows.
The only thing, that you can do:
Test the File ever byte. When you found values 1 - 9, 11-12, 14-31,127 it is normaly no ascii-file, because this are specail ASCII-Values for specaial thing (backspace, eof,etc)
GPI

