The Graham Utilities for OS/2 - Version 2


[Warpspeed]

[Table of Contents] [Index] [Previous] [Next]


MIDecode - Decode MIME files

Summary

MIDecode decodes MIME files back into their original binary images.

Icon

Command Line Format

Usage: MIDecode {Switches} <File>

Switches

-e
decode Extended Attribute data.

Description

MIDecode decodes MIME files back into their original binary images. MIME format files typically come from the Internet, where their use is increasingly popular - most modern EMail programs support them. MIME files are used to transmit binary files through EMail systems which may only allow 6, 7 or 8 bit data.

MIDecode can decode files which use the UNIX end of line character or normal DOS and OS/2 files. Thus there is no need for a -u switch.

MIME files may have multiple files within them. MIDecode will attempt to decode them all.

The MIME format is similar to the UU and XX encoding, in that it encodes three 8 bit bytes into four 6 bit characters. However, the encapsulation and the character set used is very different.

See MIENCODE for a more complete description of the encoding method.

The SUM utility has been provided to help check the integrity of the decoded files.

Possible Decoding Problems This is an example of the output of MIEncode:

Content-Type: multipart/mixed; boundary="-- part_boundary--"

---- part_boundary ----

Content-Type: text/plain; name="test" Content-Transfer-Encoding: base64

VGhpcyBpcyBMaW5lICMxDQpUaGlzIGlzIExpbmUgIzINClRoaXMgaXMgTGlu ZSAjMw0KVGhpcyBpcyBMaW5lICM0DQpUaGlzIGlzIExpbmUgIzUNCho ---- part_boundary ----

The encoding format is far more relaxed when compared to either the UU or XX encoding formats. The Content-Type line informs us of the type and contents of the file. The first one tells us that there are multiple parts to this file. The most important part of this line is the boundary definition. It is this boundary definition which tells us where one part begins and another starts. When MIDecode produces no output the most common problem is that the boundary definition is missing. If the file came from an EMail package and this information was missing, the View Full Headers option (or similar) may have to be turned on.

-e decode Extended Attribute data

This switch forces MIDecode to look for and decode encoded extended attribute data if any was found. The extended attribute data is automatically bound to the decoded file.

Example

MIDECODE GERRY.MIM
MIDecode will attempt to decode the file GERRY.MIM.