In my opinion Text files are files where is stored text which normal people can read.
That is dependant on the tool you view it with. If you display a file in the wrong codepage, it might look like binary gibberish.
Same for e.g. UTF-16 in a 1-byte encoding viewer.
Moreover, binary protocols might look largely like text (e.g. because the comment field of a file full of binary records is by far the greatest part, and is text)
And binary files are files where are stored binary data like picture files, music files, video files.
Determining _WHAT_ is in a binary file is very, very hard. The only workable solution is binarry is NOT text, and then test for an handful of specific formats you are interested in.