Text or binary attachment

"[email protected] [blat]" <[email protected]>
Newsgroups gmane.mail.blat
Message-ID <[email protected]>
How can I automatically decide if an attachment is text or binary? Usually I read some bytes from the beginning of the attachment file and check for occurence of zero byte. If it is found it will be attached in binary mode else text mode. This way 16-bit Unicode text files (containing zero bytes) are sent as binary attachment. Is it really necessary to distinguisj between text and binary mode?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.