|
Home Table Of Contents Support Pages Feedback & Contact Apple Computer, Inc. Mirror Sites Huh? |
By Robert Dorsett
This article describes UUencoding and UUdecoding, a popular method to transfer binary information on the Internet.
Answer: UUencode stands for Unix-to-Unix Encode. It is a text-based binary encryption protocol in wide use on the Internet to transfer files across multiple platforms including UNIX, Windows, MS-DOS, Macintosh, and other operating systems. UUencode is the UNIX name for the encryption program; it is normally used with another UNIX program, UUdecode, which decodes an encrypted message. Question: Why UUencode Files? Answer: The basic idea behind UUencoding a file is to translate a binary representation of data--which could be a graphic image, compressed file, or other type of binary data--into an encrypted text representation of that file. There are two reasons for doing this:
Question: How Can You Tell If It Is A UUencoded File? Answer: There is no standard file name convention, although most UNIX-based systems use a .uu as a suffix. DOS-based computers, with their standard three-digit suffixes, generally use .uue. This is one general method of telling whether or not it is a UUencoded file. Another method is actually looking at the first line of the file. A UUencoded file can be identified by the first line of the file:
begin 644 myfile.GIF This line is followed immediately by the start of the data. The first character of every line is the letter M. If the file has other characters other than M, the file is either not a UUencoded file, or has been damaged:
MuVAA=baI<RabzvYHyw@_cpUbzvYHyw@@zwl@xF]TzbaAhgmE=baOyBaA<gaL The block ends with a single line containing the statement:
end The first line signals the start of the block. The number is a UNIX permissions flag (in this case, giving the owner of the file full read, write, and execute permissions). The third part is the file name to which uudecode will expand the file. Question: What Are The Versions Of UUencode? Answer: UUencode is a standard, but a number of implementations of the software exist. Most implementations are based upon source code from versions of the UNIX software which are in the public domain. Macintosh and most Windows versions tend to combine both the UUencode and UUdecode functions into a single program, and simply allow you to choose if you want to encode or decode a message. Question: Of What Issues Should I Be Aware? Answer: UUencoded data should be line-terminated with a single carriage return. Some mail systems append multiple line feeds or carriage returns, which can confuse some implementations of UUdecode. UUencode is intended for use with a straight binary file. Since Macintosh files contain both a data fork and a resource fork, you should use Binhex to send Macintosh binary files. There are some types of files that you can UUencode, but you should limit these to files you know are going to other people using different operating systems.
UUencode and UUdecode TipsDo not embed "white space" in the file. The first line of the file should start with the begin line and the last line of the file should be the end statement.If you UUencode a file, the only way to determine if your file starts with begin and finishes with "end" is to open it in a text editor or word processing application and check it. If a message was received as multiple email messages, intervening message headers and "white space" should be removed. Some UUdecode utilities cannot handle the additional returns and headers. Since there are a large number of UUencoding and UUdecoding applications on various computer platforms, you may get some errors during the decoding process. If you encounter errors decoding a file and are sure the source (input) file is correct, try a different UUdecoding utility. If the errors persist, have the sender of the data encrypt the data using a different version of UUencode.
[Previous] [Top] [Next] |
||||
"The Information Alley", in all formats, is copyright Apple Computer, Inc.
All Rights Reserved.