Further Instructions for Use of MIME64

1) What Are the Basics for Running MIME64?

MIME64 encodes and decodes files that are in mime base64 format only.
This format is commonly used to send binary files through the e-mail
or usenet.  It is not, however, the only encoding used for these purposes.
UUencode and binhex are commonly used for this as well.  You should note
the MIME64 is useless for decoding either of those.

MIME64 must be run from a DOS prompt.  It is invoked by typing a DOS
command line at the DOS prompt.  Typically you will have received an
e-mail message that you want to decode.  You will have placed it into
a file.  Let's say the file is called stuff.txt.

Before you do anything with MIME64, be sure to make a backup copy of
stuff.txt (or whatever your file is called).  Put a copy of stuff.txt
onto floppy disk for safe keeping.  If you screw up the version that
is on your hard drive, you will be able to use the floppy to recover
the original file.

Now, move a copy of stuff.txt into the same directory in which you
have mime64.exe installed.  Let us suppose that the file you would
like to decode stuff.txt into is to be named stuff.dec.

From the DOS prompt, type:

mime64 stuff.txt stuff.dec

Observe any and all messages that mime64 puts to the screen while
it is working.

Once mime64 is done, it will return you to the DOS prompt.  You can
get back to Windows from the DOS prompt by typing:

exit

Now check to see if stuff.dec has come into existence.


2) How do I Know if my File is in MIME base64 Format?

As stated above, MIME64 is useful only if the file you want to decode
is in MIME base64 format.  To find out if this is the case, use a
browser to view the file.  If it is in MIME base64 format, somewhere
near the top of the file you will find lines that look like:


Content-type: octet/stream; name="stuff.dec"
Content-Transfer-Encoding: base64

The operative key here is the word "base64".

Below that will be a block of what appears to be gibberish.  The gibberish
will, however, have a uniform line length.  The right-hand margin should
be straight.  (If the right-hand margin is ragged, it is likely that your
base64 encoded file has been further encoded according to MIME quoted-printable
format, and you will need a program called MIMEQP in order to remove such
an encoding before you apply MIME64)  The only line of the gibberish that
should vary from the uniform length is the last line.

You should note that both UUencoded files and binhex encoded files will
also have a similar gibberish block.  UUencoded files will have each line
of gibberish begin with the same character, and you can recognize them
by this.  binhex files will say "binhex" in the line immediately preceding
the gibberish block, and you can recognize them by this.


3) How does MIME64 Deal with File Names?

A MIME-encoded file is supposed to contain a file name in the line that
looks like:

Content-type: octet/stream; name="stuff.dec"

If it does, MIME64 will use the name it finds there as the name of the
output file.

If MIME64 does not find such a line, it will use the second file name
you provide in your DOS command line as the output file name.

If you do not provide a second name in the DOS command line AND there
is no name in the file, then MIME64 will REPLACE the input file with
the output file.

For example, if at the DOS prompt you typed:

mime64 stuff.txt

and stuff.txt containd no file name in its Content-type line (or if
it had no Content-type line at all), then the existing stuff.txt would
cease to exist and a new stuff.txt would come into existence containing
the decoded information.  This is why it is so important for you to
maintain a backup copy of stuff.txt (or whatever the name of the raw
encoded file happens to be).


4) I Get an Error Message when MIME64 is Done Decoding -- What Gives?

Sometimes a file sent through the e-mail has some trailer information
following the MIME section.  If this is the case, MIME64 will become
confused by the trailer and issue an error message.  It may very well
have successfully decoded your file.  So, if this happens to you, check
to see if the appropriate output file has come into existence.


5) When I Run MIME64 over my File, it Produces Several Output Files

MIME allows that more than one file may be encoded into a MIME
transmission.  If MIME64 indicates that it is producing more than
one output file, simply make sure that every file it says it is decoding
does indeed come into existence.  You can know what files it decodes
by watching the information it produces to the screen as it works.


6) I Received a Something in E-mail that Arrived in Multiple Parts

If this has happened to you, you will need to append the parts into
one file before you run MIME64 over it.  You will need a text editor
(and not a word processor).  Use a browser to look at each part and
determine the order of the parts.  Typically you will find that it is
the block of gibberish that is broken into pieces.  You will need to
assemble these pieces using your text editor.  You will have to
eliminate e-mail headers and other superfluous stuff so that the
pieces fit together into one seamless block (i.e. no blank lines)
of the gibberish.  And you must be sure that you do not accidentally
delete any of the gibberish lines (and that you assemble them in the
right order).  Once done, you will have a merged file that you can
run MIME64 over.

You may have to find a friend who is competent with a text editor
to assist yo in this.


7) I Have a File that I am Having Difficulty Decoding

First, check to make sure that it is, indeed, in MIME base64 format.

If it is, then, as a last resort, try using a text editor to eliminate
everything from the file except block of gibberish.  If while you are
eliminating the stuff other than the gibberish you see a line that
contains what appears to be a file name, write that name down on
a piece of paper.

Be sure you have eliminated everything but the gibberish.  Do not allow
even blank lines at the top or the bottom of the gibberish block.

Now, (assuming your MIME file is called stuff.txt and that the name you
wrote down is stuff.dec) from your DOS prompt, type:

mime64 stuff.txt stuff.dec


8) I Have a File that Has a Ragged Right-hand Margin in the Gibberish Block

If the file you have has been MIME quoted-printable encoded over the
base64 encoding, you have a problem.  MIME64 will not be able to decode
it in this form.  You can download MIMEQP from ftp.coast.net
SimTel/msdos/decode/mimeqp.zip (be sure do FTP in binary mode).  If you
cannot do FTP, send e-mail to Keith at w8sdz@SimTel.Coast.NET, and ask
him to e-mail you a copy of MIMEQP (and mention that it is in the
msdos collection under decode).  If you receive MIMEQP via e-mail,
it will likely arrive in UUencoded form.  If you do not have a UUdecoder,
be sure to mention that in your e-mail to Keith.

When you get MIMEQP ready to run, all you need to know is that it works
similarly to MIME64 in that it runs from a DOS prompt and takes two
arguments.  So if you had stuff.txt as your encoded file, you would
type:

mimeqp stuff.txt stuff.uqp

The file stuff.uqp would then become your quoted-printable decoded file.
Use a browser to check stuff.uqp.  Its gibberish block should now have
a straight right-hand margin.  If this is the case, you can then run
MIME64 over stuff.uqp.  For example, you would type:

mime64 stuff.uqp stuff.dec




