Google
 
   
Login
Username:

Password:


Lost Password?

Register now!
Search
Main Menu
top books
Polls
What do you think about php-deluxe.net?
Excellent!
Cool
Hmm..not bad
What the hell is this?
encyclopedia
recommendation
compare webbrowser
Freenet DSL
Who's Online
5 user(s) are online (5 user(s) are browsing encyclopedia)

Members: 0
Guests: 5

more...
browser tip
Unix Befehle
manual of unix befehle
recommendation!
Sponsored
partner

Uuencode

Uuencode is a form of ASCII armor that originated as a Unix program for encoding binary data for transmission over the uucp mail system. The name uuencode is derived from Unix-to-Unix encoding . Since uucp converted characters between various computer s character sets, uuencode was used to convert the data to fairly common characters that were unlikely to be translated and thereby destroy the file. The program uudecode reverses the effect of uuencode, recreating the original binary file exactly. uuencode/decode became popular for sending binary files by E-mail and posting to usenet newsgroups etc. However it has now been largely replaced by MIME.

=The encoding process=

Uuencoded data starts with a line of the form: begin Where is the file s read/write/execute permissions as three octal digits, and is the name to be used when recreating the binary data.

Uuencode repeatedly takes in a group of three bytes, adding trailing zeros if there are less than three bytes left. These 24 bits are split into four groups of six which are treated as numbers between 0 and 63. Decimal 32 is added to each number and they are output as ASCII characters which will lie in the range 32 (space) to 32+63 = 95 (underscore). ASCII characters greater than 95 may also be used; however, only the six right-most bits are relevant.

Each group of sixty output characters (corresponding to 45 input bytes) is output as a separate line preceded by an encoded character giving the number of encoded bytes on that line. For all lines except the last, this will be the character M (ASCII code 77 = 32+45). If the input is not evenly divisible by 45, the last line of will contain the remaining N output characters, preceded by the character whose code is 32+N. Finally, a line containing just a single space (or grave character) is output, followed by one line containing the string end .

Sometimes each data line has extra dummy characters (often the grave accent) added to avoid problems with mailers that strip trailing spaces. These characters are ignored by uudecode. The grave accent (ASCII 96) can also be used in place of a space character. When stripped of their high bits they both decode to 100000.

Despite using this limited range of characters, there are still some problems encountered when uuencoded data passes through certain old computers. The worst offenders are computers using non-ASCII character sets such as EBCDIC.

=Sample uuencode=

The diagram shows the uuencoding of the three ASCII encoded characters Cat into its uuencoded representation 0V%T .

If the complete uuencoded output of the three ASCII characters Cat might appear as the following begin 644 cat.txt #0V%T ` end

=Uuencode table=

The following table represents the subset of ASCII characters used by UUEncode and the 6-bit binary string they represent.

=See also=

  • Base64
  • BinHex
  • MIME
  • =References=