This article is from the Hungarian FAQ, by Zoli Fekete fekete@bc.edu with numerous contributions by others.
5.2.5.1 Uuencode & uudecode
The easiest and most popular way of conversion between binary and
ASCII is the use of the twin sisters uuencode and uudecode. These
programs were created originally for Unix ('uu' stands for Unix to
Unix), but today they are implemented under most platforms.
Uuencode makes an ASCII file out of a binary one, forming 61 character
long lines to avoid problems excessively long lines can cause in the
different mailer agents. This conversion increases the size of the file
by 40%. Warning! Understand the really goofy usage of uuencode. The
parameters specify the local & remote BINARY filenames respectively.
The encoded ASCII result is sent to the standard output, it has to be
redirected into a file explicitly. (E.g. uuencode myface.gif myface.gif
> myface.uue )
Uudecode converts the encoded ASCII file back to binary. It is smart:
using the "begin" and "end" tags placed in the encoded file, uudecode
is able to retrieve the encoded information automatically discarding
everything before and after the tags (headers, signatures, other junk),
even if it's inserted in the middle of the Encyclopedia Britannica. Its
usage is also simple: only the input filename has to be specified; the
original filename is restored from the "begin" tag. (E.g. uudecode
yourface.mal )
5.2.5.2 MIME support
Many modern mailers support the MIME (Multipurpose Internet Mail
Extensions) standard being able to transfer different file formats
beyond plain text. In this case the ASCII/binary conversion is the
mailer's internal affair. Some mailers make explicit calls to uuencode
and uudecode, some others (e.g. PINE) have different built in
conversion algorithms, trying to choose the most appropriate one for
the given binary file. (One type of MIME encoding substitutes an
unprintable character by its code in hexadecimal, preceded by an =
sign. That's why you often see them splattered around.) In either case,
however, the user is not responsible for the conversion, the mailer
takes care of it automatically.
5.2.5.3 Binhex
BinHex files are 7-bit ASCII text files, typically used for encoding
Macintosh binaries. Conversion is done by various applications, see eg.
<ftp://rtfm.mit.edu/pub/usenet-by-group/comp.answers/macintosh/general-faq>.
 
Continue to: