On Wednesday, March 5, 2003, at 09:24 AM, Ward Oldham wrote:

> Lee will probably know the specifics but I read a long time ago either 
> in a
> tech blurb on Microsoft's site, MacFixIt or MacOSXHints that the 
> correct
> encoding to use for sending attachments from any cpu to any cpu is 
> Windows
> (Base64/MIME).

I should put this into the faq because I seem to be answering it here 
about every six months or so...

There are two issues going on here: packaging and encoding.

Before talking about those, let's look at a typical Macintosh file. It 
contains two parts that Apple calls the data fork and the resource 
fork.  The data fork contains the meat of the file and the resource 
fork contains information for the program that created the file and 
some Mac-specific information. In the case of a GIF or JPEG file, all 
the information a Windows user can use is in the data fork.

Apple has defined two standard ways to package such files for transit: 
AppleSingle and AppleDouble.

AppleSingle format squashes both forks together into one file. This 
usually makes no sense to any receiving machine that isn't running Mac 
OS, so it shouldn't be used when sending a file to a Windows machine.

AppleDouble format divides the file into two files -- one for each 
fork. When sent via e-mail, the file will generate an attachment for 
each of these files. A Windows machine should be able to read GIF or 
JPEG files by choosing the attachment that corresponds to the data 
fork. Since AppleDouble is a MIME standard packaging, better e-mail 
programs everywhere should know what to do with the pieces.

That takes care of the packaging; now we get to the encoding.

Standard e-mail is based upon the 7-bit ASCII character set. Graphics 
files use all eight bits, so they can't be sent by e-mail without 
encoding them into the 7-bit limit imposed by e-mail. There are three 
common ways this is done on the Mac: BinHex, uu and Base64.

BinHex is an encoding method peculiar to the Mac. You can recognize a 
BinHex-encoded file by the "hqx" extension. Don't use this for e-mail 
because nobody but Macs can read it. It was a hack put together in the 
early days of CompuServe, and caught on because there was no 
competition at the time. (To be more accurate, BinHex takes care of 
both packaging and encoding at the same time.)

uu-encoding is an encoding method from the Unix world. The "uu" is 
short for Unix to Unix. Although it is fairly universally recognized, 
it is not the best one for e-mail.

The best encoding method for e-mail is Base64. It is universally 
recognized and should work all the time.

So, to send data to a Windows machine, your best bet is AppleDouble 
packaging and Base64 encoding. Most Mac e-mail programs default to 
this. Some programs have a setting to just send the data fork; this 
will also work for GIF and JPEG.

Allan Atherton wrote:

> I once asked one of the people to send their little file back. As I
> remember, it had the jpg filename of my photo, but the generic icon of 
> a
> text document. I opened it with a text processor and saw lines of code 
> with
> the word "Photoshop Elements". I had used Elements to reduce the file 
> and
> attach it to the email.  Both people were using new Windows machines, 
> so I
> theorized that Elements had added a data fork to the file which 
> confused
> their machines.

I suspect the file that was sent back was the resource for part of the 
file, and not the data fork. I don't know why their machines are having 
trouble picking up the data fork. If you send me a file with an 
enclosed JPEG, I'll take a look to see how your Entourage is packaging 
the file.



| The next meeting of the Louisville Computer Society will
| be March 25. The LCS Web page is <http://www.kymac.org>.


Reply via email to