Use UUencode/BinHex/MIME files with WinZip

2 users found this article helpful

WinZip can open and extract UUencoded, XXencoded, BinHex, and MIME files (base64, plain/text, and quoted-printable), and can UUencode files. This section explains the need for these features and abilities, includes instructions for using them, and shows how they can bring a whole new dimension to your e-mail operations.

UUencoded, XXencoded, BinHex, and MIME files

Sending Files using Internet Mail

If you have a direct connection to the Internet, you may already be using an e-mail program that allows you to attach files to messages. However, many e-mail programs cannot easily transfer files to Internet addresses. WinZip can enable you to send and receive files using nearly any e-mail program.

Note: If your e-mail program does have the ability to transfer files, consider using WinZip to compress them before transfer -- it will usually take far less time since the file will be smaller.

The Why behind UUencoding and Other Schemes

Some Internet protocols were not designed to carry binary (program and other non-text files) files. They are only able to transfer messages made up of conventional text (printable ASCII) characters. In order to get around that limitation, UUencode and other methods were created.

These solutions all perform the same basic operation: they encode the non-transferable binary file into ASCII characters that the e-mail system can handle. The person receiving the message can then decode the strings of characters to recreate the original file. Perhaps you have seen one of these apparently unintelligible messages; here's an example:

begin 666 encoded.txt
M5&5S="$-"@T*1V5N=&QE(%)E861E<CH-"@T*5&AI<R!I<R!N;W1H:6YG(&UO
M<F4@=&AA;B!A('1E<W0@9FEL92!C<F5A=&5D('1O('!R;W9I9&4@9F]D9&5R
M(&9O<B!T:&4@=F%R:6]U<R!E;F-O9&EN9R!S8VAE;65S+B!)9B!Y;W4@87)E
M('5S:6YG(&ET('1O('1E<W0L(&-O;F=R871U;&%T:6]N<R!O;B!Y;W5R(&%G
M:6QI='D@:6X@8W5T=&EN9RP@<&%S=&EN9RP@<V%V:6YG+"!A;F0@9&5C;V1I
:;F<@=7-I;F<@5VEN6FEP+@T*#0I%;FIO>2$`
`
end

WinZip can easily open and extract UUencoded, XXencoded, BinHex, and MIME files (base64, plain/text, and quoted-printable) that have been sent to you, and create UUencoded files for you to send.

Receiving and Preparing Files for Decoding

The message you receive with an encoded file will need to be prepared for the simple WinZip decoding operation. The steps you take will depend on the e-mail program you are using.

Be aware that some e-mail programs may crash or cut off parts of unusually large messages, so saving them as a file without opening them is the preferred method.

Your e-mail program may save a message attachment as an external file in a folder designated to receive them. In that case, it may automatically be named; you may wish to rename it, using a .UUE extension, for maximum convenience.

Sometimes you may receive multiple messages, where a file is split up into more than one message because of size limitations. You will need to use a text editor or the DOS COPY file command to paste the files together into one large file, and save it as a text file with a .UUE extension.

Decoding Files using WinZip

You do not need to worry if the file being sent is UUencoded, XXencoded, BinHex, or a MIME file (base64, plain/text, and quoted-printable). WinZip will detect the method being used and automatically decode it.

As is the case with Zip files, WinZip offers more than one way to open encoded files. For example:

Note: you can also open a file using WinZip's Open toolbar button, or drag and drop a file into WinZip, regardless of the file's extension.

UUencoding a File using WinZip

WinZip UUencodes Zip files for mailing, so you must choose and open an existing Zip file to encode or create a new one.

A UUencoded file has been created from your Zip file. For example, you will find a TESTFILE.UUE file in the same folder along with your original TESTFILE.ZIP.

Mailing a UUencoded File

How you include a UUencoded file in a message will depend on your e-mail program. Some e-mail programs require you to attach the .UUE file to the mail message. Other e-mail programs require you to open the .UUE file you have created using a text editor, copy the entire contents, or portions of it, to the Windows clipboard, and paste it into your open e-mail message. Further information on handling large files is included in the next section, Hints, Tips, & Troubleshooting.

Hints, Tips, & Troubleshooting

WinZip makes decoding these file attachments very convenient. Here are some hints to make the road even smoother:

The most common problems we encounter with files that cannot be decoded are incomplete data and missing header information. The integrity of the message is critical, and the header must be intact for decoding. We have included short examples of each of the following encoding formats. You may find them helpful for comparison purposes with messages you receive, to confirm that they appear properly encoded and are not missing header and closing data. Examples are included below that you may review.

Multi-Part Encoded Files must be combined before they can be processed by WinZip. If you encounter encoded data spread across multiple files, you can either combine the parts using a text editor, and then open them with WinZip, or you can use another program, like the UUDeview package from Frank Pilhofer. (WinZip's decoding subroutines are based on the UUDeview package.) The original UUDeview is a text mode command line driven program, or you can download a Windows interface by Michael Newcomb. These free programs are available from the Internet addresses http://www.fpx.de/fp/Software/UUDeview (Germany) and http://www.miken.com/uud (USA), respectively.

Further information about encoding files can be found in many places on the Internet. A good place to start is the "Introduction to Decoding" article on the UUDeview Home Page. The MIME specification is defined in RFC 1521, and is widely available on the Internet.

Examples

The following are examples of various encoding schemes.
Here is an example of a UUencoded file:

begin 666 encoded.txt M5&5S="$-"@T*1V5N=&QE(%)E861E<CH-"@T*5&AI<R!
I<R!N;W1H:6YG(&UO M<F4@=&AA;B!A('1E<W0@9FEL92!C<F5A=&5D('1O('!R;W9
I9&4@9F]D9&5R M(&9O<B!T:&4@=F%R:6]U<R!E;F-O9&EN9R!S8VAE;65S+B!)9B!
Y;W4@87)E M('5S:6YG(&ET('1O('1E<W0L(&-O;F=R871U;&%T:6]N<R!O;B!Y;W5
R(&%G M:6QI='D@:6X@8W5T=&EN9RP@<&%S=&EN9RP@<V%V:6YG+"!A;F0@9&5C;V1
I :;F<@=7-I;F<@5VEN6FEP+@T*#0I%;FIO>2$`
`
end

Here is an example of a XXencoded file:

begin 666 encoded.txt hJ4JnR02B0Uo8FqJiR4lZ637ZMKFZQXcB0Uo8J4VdQm-
dQm-iPrFcOKtb64pj hQaIUR4VVPW-V65FZQrEUNaZgNG-XQaJVR4JY65Fj65-mPrN
dN4IUNaxYN4Jm h64NjQW-oO4IURa3mOKxpQm-ZPaBjN4ZiNm-nMqVZPKJn9W-7NW-
tPrIUML7Z h65JnOKtb64Zo65Fj65FZQrEg64BjPaRmMLFpP43oOKxiQm-jPW-tPrJ
m643b hOKldR5YUOKsUMrJoR4ZiNmkUQ43nR4ZiNmkUQq3qOKtb90-VPaEUN4JXPqF
d OPaQURLBdPaQUJqZiKaZk9Uo81Ed3PadjSG2+ + end

Here is an example of a BinHex file:

VGVzdCENCg0KR2VudGxlIFJlYWRlcjoNCg0KVGhpcyBpcyBub3RoaW5nIG1vcmUgdG
hhbiBhIHRl c3QgZmlsZSBjcmVhdGVkIHRvIHByb3ZpZGUgZm9kZGVyIGZvciB0aGU
gdmFyaW91cyBlbmNvZGlu ZyBzY2hlbWVzLiBJZiB5b3UgYXJlIHVzaW5nIGl0IHRv
IHRlc3QsIGNvbmdyYXR1bGF0aW9ucyBvbiB5b3VyIGFnaWxpdHkgaW4gY3V0dGluZy
wgcGFzdGluZywgc2F2aW5nLCBhbmQgZGVjb2Rpbmcg dXNpbmcgV2luWmlwLg0KDQp
FbmpveSE=

Here is an example of a MIME file:

--- Content-Type: application/octet-stream; name="encoded.txt"
Content-Transfer-Encoding: base64 Content-Disposition: inline;
filename="encoded.txt" Content-MD5: V8ttTjZgvmMkzwVFKr5Olw== VGVzdCENCg0KR2VudGxlIFJlYWRlcjoNCg0KVGhpcyBpcyBub3RoaW5nIG1vcmU
gdGhhbiBh IHRlc3QgZmlsZSBjcmVhdGVkIHRvIHByb3ZpZGUgZm9kZGVyIGZvc
iB0aGUgdmFyaW91cyBl bmNvZGluZyBzY2hlbWVzLiBJZiB5b3UgYXJlIHVzaW5
nIGl0IHRvIHRlc3QsIGNvbmdyYXR1 bGF0aW9ucyBvbiB5b3VyIGFnaWxpdHkga
W4gY3V0dGluZywgcGFzdGluZywgc2F2aW5nLCBh bmQgZGVjb2RpbmcgdXNpbmc
gV2luWmlwLg0KDQpFbmpveSE= -----

Was this article helpful?

Tell us how we can improve it.