Subject: Re: Q: BinHex - whato do with it

From: david <[email-masked]>
Date: Sat, 5 Aug 1995 20:05:59 +1000

On 25 Jul 1995, Mike Brudenell wrote:

> "BinHex" is a binary-to-text encoding for Apple Macintosh files.

Correct, and BinHex 4.0 has been adopted as a MIME type:

  application/mac-binhex4.0

What folks are asking is, can PINE detect attachments of this type and 
automatically "de-binhex" 'em (in the same way that base64 encoded 
attachments are decoded).

> So your easiest route is to save the attachment to a file, take it to an
> Apple Macintosh and feed it to an unpacking program such as "StuffIt
> Expander".

No way!  I've had success saving attachments to a file then manually 
running mcvert to de-binhex the file (followed by a dd to strip off the 
128-byte Mac header if I wanted to get at the file straight away);  
having to "take it to an Apple Macintosh" is just nowhere near the 
"easiest route", especially when someone is sending me a plain text file, 
or a GIF image that I subsequently want to manipulate under UNIX.

"Okay," I hear, "why don't you just make do with mcvert?"  Partly because 
it's cumbersome, partly because it's *easier* to have the decoding of 
BinHex4.0 files built into PINE (perhaps an option during compile-time) 
for when you're getting PINE up and running on a new machine (os or 
platform - quite common 'round here).

No need for *encoding*, just *decoding*.  Not too much, surely?  :-)

> There are also deBinHexers available for DOS and UNIX, but you may well 
> find that the deBinHex'd file is a compressed archive (eg, a StuffIt 
> archive) that needs further processing.  StuffIt Expander will do it all.

No way - whilst "archives" are often sent around as binhex files, often 
Mac mailers encode single files in binhex, which is real annoying when 
you read your mail on a UNIX box, want to process that single file on 
that same UNIX box, but need to go through some extra step first.

Obviously, if the decoded file is a compressed or self-extracting 
archive, then taking it to a Mac is necessary - but what about everything 
else?  :-(

Just as doco exists covering QP and base64 encoding, doco also exists 
covering BinHex4.0;  surely it wouldn't be too difficult to add it in at 
some stage (decoding only)?  Hmmm .. might poke around with 3.91 later...

Cheers..

dave