[an error occurred while processing this directive]
  BinHex Info      Page Info

Navigate

BinHex Info


General Info

BinHex encoding converts an 8-bit file into a 7-bit format, similar to uuencoding. BinHex format preserves file attributes, as well as Macintosh resource forks, and includes CRC (Cyclic Redundancy Check) error-checking. This encoding method works on any type of file, including formatted word processing and spreadsheet files, graphics files, and even executable files (i.e. programs or applications). The encoded file can also be passed from computer to computer in its encoded form. The encoding will remain intact and it will be equally meaningless on all the machines until it is unencoded. To be usable or readable it must be converted back to its original format and be run on a compatible computer.

Note: This is not to be confused with MacBinary encoding, which is an 8-bit format.
(By the way, the MIME type Base64 is a 6-bit format! Isn't math fun?)

 

What it looks like

Here is a sample of what BinHex actually looks like:
(This file must be converted with BinHex 4.0)
:$f*TEQKPH#jdCA0d,R0TG!"6594%8dP8)3#3"!&m!*!%EMa6593K!!%!!!&mFNa
KG3,r!*!$&[rr$3d,BQPZD'9i,R4PFh3!RQ+!!"AV#J#3!i!!N!@QKUjrU!#3'[q
3"&4&@&483N)f!3#Xaj6bV-H8mJ!!!B3!N!0"!*!$[3#3!cR@iiY)!*!'[I%4!!J
Fp$X%X3@J!mZE6!GRiKUi$HGKMf0U61S46%i1"AB!TI,fLl!d1X3RDDE8ALfTCbM
8UP9p4iUqY-0k4krHpk9XK@`rbj2Ti'U@5rGH@+[fr-i4T6-qXpfl26,k!H5$Nml
TIkI'(l3GI4)f8mII&01CNEbC2LrNLBeaZ1HG@$G8!Z6"k)hh,q9p"r6FC*!!Se"
(ic,Pd(4(b`pflKC`H1&JN5)GVX3mREdH55[l`%`Yhp%q092c`A(hPV)!83Dr&f4
$$L#I1aM-"VjqV-q$34KQq6$M$f8#,Zc,i),!(`*ZN!$K$rS!LA%3cL+dYi"@,K(
Z"`#3!fKi!!!:

Note that all lines other than the header and the last line are exactly 64 characters long (not counting the newline characters). If you receive a file in email containing lines of varying lengths, then someone's mail system may have damaged the file and you'll probably need to have it resent.

The line "(This file must be converted with BinHex 4.0)" is an integral part of the file format; in fact, if it is missing or even altered in any way, the file may not get recognized as binhex by a decoder program (not a problem for StuffIt Expander, though). Note also that this does not mean you need a program called "BinHex 4.0" to decode a BinHex file; there are several utilities which can do the trick, the most popular of which are listed on this very page (the page you are reading right now).

Here is some C source code to un-HQX in Unix, the readme from macutil, Pascal source code [ftp_file] of DeHQX 2.0 by Peter Lewis (a great set of code and a good "standard" to follow), and some notes from Yves himself.

 


BinHex versus MIME

Uh-oh, flamebait! Dare I even attempt to tackle this issue? Actually, there is more than one issue here: we've got email attachments, archive file formats, available source code, level of complexity, and varying implementations regardless of platform. Hmm, I'll leave this alone for now; eventually I'll fill this space up with comparison tables, URLs, and scary stuff like that! In the meantime, the fact is that BinHex is ubiquitous and won't be disappearing anytime soon, so whether it is "preferred" or not is, for the most part, a moot point.

Also, Microsoft has chosen to use the BinHex format as a wrapper for Macintosh ActiveX controls. Apple has specified that Sherlock plug-in updates be posted on web sites in BinHex.

See also TidBITS: Macintosh Internet File Format Primer.

 


Macintosh Utilities

 


DOS/Windows Utilities

 


Unix Utilities

SunOS/Sparc2
(Info provided by John Gianni, http://www.cadence.com)

Many Sparc un-binhexing utilities exist. I think most, if not all, are listed on archie servers (telnet archie.sura.net; login as "qarchie"; run the command, "prog binhex"; type "mail yourLogin" to get the report; type "quit" to exit).

hexbin   hexbin.man
binhex   binhex.man
xbin     xbin.man
rdbinhex (script to automate unbinhexing and conversion to UNIX)

 


Amiga Utilities

MacTools v2.01b1 will decode BinHex files on the Amiga platform. On Genie, this file can be found in the Amiga RT library, file #19368. (It's probably also on Aminet...) Info provided by Mike Webb (page devoted to the Amiga, Texas Instruments TI-85 calculators, and music...for now - also soon to be the home of a new online Amiga magazine).

 


Apple ][ Utilities

From Harold.H on Genie:
No BinHex utils that I know of that have been released. I've been trying to find time to write one though :)
Wait... GSCII+ (a IIgs desk accs) handles BinHex, but it's not exactly stable

 


This page was mentioned in a Macworld magazine column, Parcel Post--Internet-Style (April 1996 issue, page 122, sidebar "Web Worthy"). :-)

[Hand-coded in Tex-Edit Plus] [MacOS] PC Webopaedia Outstanding Page Award

 
Please choose a menu item before pressing the Go button.
     
     

Info:    Site Maps   About Us   Site Info 
Actions:  Search   Communicate   Download 

<URL:http://www.natural-innovations.com/binhex/> (page info) [an error occurred while processing this directive]

natural-innovations.com (c) 1995-2012 Walter Ian Kaye