1 .TH uuencode 5 "May, 2001" "Apple Computer, Inc."
5 .ND description of the uuencode file format
10 command generates files in a format that allows them to be successfully
11 transferred by systems which strip the high bit from an 8-bit byte.
13 decodes uuencoded files.
16 The uuencode file format consists of three sections: header, body, and trailer.
17 The header is a line is of the form:
20 begin 644 "filename.ext"
25 -format permissions byte for the file and "filename.ext" is the name of
29 The body section is the encoded representation of the source file. Three
30 bytes of input file data are encoded into four bytes of output data.
32 The 24 input bits are divided up into four pieces of six bits
33 each. The integer value 32 (the ASCII value for the space character) is
34 added to each of these pieces to move them outside of the range of control
35 characters. To avoid using the space character in the encoding, pieces with
36 value zero are encoded using backquote (ASCII value 96) instead of zero. The
37 resulting character is one of the this set (ASCII values 96,33-95):
39 .DQ `!"#$%&'()*+,-./012356789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_
42 A line itself contains three segments: a length character (encoded using
43 the "add a space" algorithm described above), the body of the line,
44 typically (although not required to be) 60 output characters long,
45 representing 45 input bytes, and (of course) a linefeed. The length
46 character specifies the number of valid input bytes on the line (so, for
47 a line which is 60 encoded bytes, the length value would be 45).
48 Decoding programs should decode no further than the specified length on
52 The trailer, which must exist, consists of a single backquote
53 ("`", ASCII 96) character on a line by itself, directly followed by
59 is the canonical filename extension for uuencoded files.
62 uudecode does not read all permutations of the file format described in
66 Ancient versions of uuencode used a space character (ASCII 32) in the
67 encoding to represent zero. Many (arguably broken) mailers and transport
68 agents stripped, rewrapped, or otherwise mangled this format, so the space
69 was later changed to the backquote, ASCII 96. Decoders may attempt to
70 read the older format if they wish, though it's unlikely to be encountered
71 in practice at this point in time.
74 The uuencode encoding method is highly ASCII-centric. In particular, the
75 character set used doesn't work well on EBCDIC-based systems. (EBCDIC,
76 generally used by IBM mainframes, is an old alternative character encoding;
77 most computers use ASCII instead).
80 Many variants of uuencode on various platforms generate different forms
81 of line checksums, using to represent the checksum one or more encoded
82 characters after the last counted character in a line. Because these
83 formats are different and impossible to distinguish (with certainty),
84 such characters should be ignored by decoding implementations.
87 The uuencode encoding format has no provisions for segmented files.
88 Writers of segmenting utilities should be careful to avoid using
89 character sequences that may naturally occur in the encoding (such
90 as sequences of dashes ("---")) to divide sections.
93 The MIME Base64 encoding (documented in RFC 2045) is a consistent,
94 cross-platform-savvy message encoding which should be used in place of
95 UUEncode wherever possible.
98 The Unix-Hater's Handbook (IDG, 1994) identifies the folly of the
99 older zero-encoded-as-space versions of uuencode.