How do you identify the file content as being in ASCII or binary using C++?
My text editor decides on the presence of null bytes. In practice, that works really well: a binary file with no null bytes is extremely rare.