Text or binary attachment
| 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?