| Previous | Contents | Index |
Encodes a binary file into a printable format for transmission as an
e-mail message. Encoded files may be decoded with the pmdf
decode utility. Both the standard MIME encodings as well as a
few additional encodings (e.g., UUENCODE) are supported.
None.
pmdf encode input-file-spec encoded-file-spec
Qualifiers Defaults -encoding=type -encoding=BASE64 -filename -nofilename -header -noheader -line_length -line_length=64
| Input file: | input-file-spec |
| Output file: | encoded-file-spec |
input-file-spec
Specifies the name of an input file. The input file may be any binary file. Only a single input file may be specified; wildcards are not allowed.encoded-file-specThe name of the file to produce as output. The file output bypmdf encodewill contain all of the information necessary to reconstruct the original input file. The format of the output file is described in the Description section below.
pmdf decodeandpmdf encodehave been, for the most part, made obsolete by MIME-aware user agent such as pine. If you use pine, then files which you send with theSendcommand will be encoded automatically, if necessary. Encoded messages which you receive will be decoded automatically, if necessary, and may simply be extracted to a file with theSavecommand. If, however, you do not use a MIME aware user agent such as pine, then read on.The
pmdf encodeandpmdf decodeutilities are provided with PMDF as a means of transmitting binary files via e-mail. Withpmdf encode, a file may be encoded in a format which uses short records containing only printable characters. Such files can then be transmitted through most any mail system without being altered (e.g., lines wrapped, characters removed or replaced, etc.).pmdf encodepreserves all file contents and all file attributes when encoding a file. The contents and attributes are properly restored when decoded withpmdf decode. Absolutely any type of file can be transmitted with these two utilities.Encoded files have two parts. The first part is a conventional RFC 822 message header. Header lines are used to describe the file format; this information includes a description of the encoding used to convert the file into a printable form for transfer.
pmdf encodecreates this header;pmdf decodereads it and uses the information it contains to reconstruct the file.
Note
Many encoded messages received with PMDF are decoded automatically for you, thus obviating the need to usepmdf decodeat all. This is especially true when you use pine whoseSavecommand will extract any MIME-encoded message or message body part. If you use a non-MIME aware user agent, however, you may occasionally receive an encoded message which PMDF could not deliver in its decoded form to mail owing to limitations of mail itself.
-encoding=type
This qualifier controls the type of encoding used to encode the input file. The possible values for this qualifier areBASE32,BASE64,CBASE64gzip compressed BASE64,BASE85,BINHEX(encoding only, not the file format),BTOA,HEXADECIMAL,QUOTED_PRINTABLE,UUENCODE,CUUENCODE(gzip compressedUUENCODE).BASE64encoding is the default; this is also the default decoding type used bypmdf decode.-filename
-nofilename (default)
When used in conjunction with the-headerqualifier, this qualifier specifies that the filename should be included in the MIME headers generated. Only the name and extension portion of the input file specification will be used; any node, device, directory, and version number information will be discarded. By default, no filename parameter is specified in theContent-type:orContent-disposition:header lines. Or if used with-encoding=uuencode, the-filenamequalifier causes the filename to be included on thebegin 600line.-header
-noheader (default)
This qualifier controls whether or not a MIME-compliant header is placed at the beginning of the output.-headeris the default.-noheaderis used to produce output suitable for use in non-MIME messaging applications. Note that all structural information about the file is lost when-noheaderis used.-line_length=length
The encoded data is written with fixed length records. The length of these records (i.e., line length) is controlled with the-line_lengthqualifier. By default, the line length is 64 characters. Specifying a line length in excess of 80 characters is not recommended as many mailers will wrap lines longer than 80 characters.
See the example provided for the
pmdf decodecommand. In that example, the use ofpmdf encodeis also demonstrated.
| Previous | Next | Contents | Index |