Re: Text or binary attachment

"'Chip' [email protected] [blat]" <[email protected]>
Newsgroups gmane.mail.blat
Message-ID <020AEF3A610F45F9B10C438776A0A9B5@chip>
>> 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 occurrence 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 distinguish between text and binary mode?

> This question has always intrigued me: what harm will it do if all
> attached files are treated as binary?

If your clients are expecting a text attachment, perhaps for automated
systems, then sending those as binary would cause problems for your clients.

Chip
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.