next up previous
Next: The Empty Line Up: Uuencoding Previous: The begin Line

Encoded Data

The basic version of uencoding simply uses the ASCII characters 32-95 for encoding the 64 values of a three in for encoding. An exception12 is the value 0, which would normally map into the space character (ASCII 32). To prevent problems with mailers that strip space characters at the beginning or end of the line, character 96 ```'' is used instead. The encoding table is shown in table 2.


Table 2: Encoding Table for Uuencoding
Data Value +0 +1 +2 +3 +4 +5 +6 +7
0 ` ! " # $ % #3397#>  
8 ( ) * + , - . /
16 0 1 2 3 4 5 6 7
24 8 9 : ; < = > ?
32 @ A B C D E F G
40 H I J K L M N O
48 P Q R S T U V W
56 X Y Z [ \ ] ^ _


Each line of uuencoded data is prefixed, in the first column, with the encoded number of encoded octets on this line. The most common prefix that you'll see is `M'. By looking up `M' in table 2, we see that it represents the number 45. Therefore, this prefix means that the line contains 45 octets (which are encoded into 60 7#7 plain-text characters).

In uuencoding, each line has the same length, normally, the length (excluding the end of line character) is 61. Only the last line of encoded data may be shorter.

If the input data is not a multiple of three octets long, the last triple is filled up with (one or two) nulls. The decoder can determine the number of octets that are to go into the output file from the prefix.


next up previous
Next: The Empty Line Up: Uuencoding Previous: The begin Line
m68k build daemon 2002-04-15