Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML//EN"> |
2 | <html> | |
3 | <head> | |
4 | <title>MHonArc Resources: MIMEDECODERS</title> | |
5 | </head> | |
6 | <body> | |
7 | <!--x-rc-nav--> | |
8 | <table border=0><tr valign="top"> | |
9 | <td align="left" width="50%">[Prev: <a href="mimeargs.html">MIMEARGS</a>]</td><td><nobr>[<a href="../resources.html#mimedecoders">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next: <a href="mimeexcs.html">MIMEEXCS</a>]</td></tr></table> | |
10 | <!--/x-rc-nav--> | |
11 | <hr> | |
12 | <h1>MIMEDECODERS</h1> | |
13 | ||
14 | <!-- *************************************************************** --> | |
15 | <hr> | |
16 | <h2>Syntax</h2> | |
17 | ||
18 | <dl> | |
19 | ||
20 | <dt><strong>Envariable</strong></dt> | |
21 | <dd><p>N/A | |
22 | </p> | |
23 | </dd> | |
24 | ||
25 | <dt><strong>Element</strong></dt> | |
26 | <dd><p> | |
27 | <code><MIMEDECODERS></code><br> | |
28 | <var>decoder-specification</var><br> | |
29 | <var>...</var><br> | |
30 | <code></MIMEDECODERS></code><br> | |
31 | </p> | |
32 | </dd> | |
33 | ||
34 | <dt><strong>Command-line Option</strong></dt> | |
35 | <dd><p>N/A | |
36 | </p> | |
37 | </dd> | |
38 | ||
39 | </dl> | |
40 | ||
41 | <!-- *************************************************************** --> | |
42 | <hr> | |
43 | <h2>Description</h2> | |
44 | ||
45 | <p>The MIMEDECODERS resource specifies Perl routines to call | |
46 | for decoding MIME encoded data. For message bodies, the encoding | |
47 | is specified by the <tt>Content-Transfer-Encoding</tt> header | |
48 | field. Data encoding can also occur for non-ASCII data in | |
49 | message headers. | |
50 | </p> | |
51 | ||
52 | <p>The MIMEDECODERS resource can only be defined via the | |
53 | resource file. Each line of the element specifies a encoding, | |
54 | the Perl routine for filtering the character set, and the Perl source | |
55 | file containing the routine. | |
56 | </p> | |
57 | ||
58 | <p>Example:</p> | |
59 | <pre> | |
60 | <b><MIMEDecoders></b> | |
61 | base64; base64::b64decode; base64.pl | |
62 | <b></MIMEDecoders></b> | |
63 | </pre> | |
64 | ||
65 | <p>The first field is the encoding method. The second field | |
66 | is the routine name (which should contain a package qualifier). | |
67 | The third field is the source file the routine is defined. The | |
68 | source file is optional if the routine is known to be defined in | |
69 | an already listed source file. | |
70 | </p> | |
71 | ||
72 | <p>There are some special decoder routines | |
73 | values. They are as follows: | |
74 | </p> | |
75 | ||
76 | <dl> | |
77 | ||
78 | <dt><em>as-is</em></dt> | |
79 | <dd><p>Leave the data "as-is". | |
80 | </p> | |
81 | </dd> | |
82 | ||
83 | </dl> | |
84 | ||
85 | <p>Each decoder function is invoked as follows: | |
86 | </p> | |
87 | ||
88 | <pre> | |
89 | $decoded_data = &function($data); | |
90 | </pre> | |
91 | ||
92 | <!-- *************************************************************** --> | |
93 | <hr> | |
94 | <h2>Default Setting</h2> | |
95 | ||
96 | <pre> | |
97 | <b><MIMEDecoders></b> | |
98 | 7bit; as-is; | |
99 | 8bit; as-is; | |
100 | binary; as-is; | |
101 | base64; base64::b64decode; base64.pl | |
102 | quoted-printable; quoted_printable::qprdecode; qprint.pl | |
103 | x-uuencode; base64::uudecode; base64.pl | |
104 | xuue; base64::uudecode; base64.pl | |
105 | uuencode; base64::uudecode; base64.pl | |
106 | <b></MIMEDecoders></b> | |
107 | </pre> | |
108 | ||
109 | <!-- *************************************************************** --> | |
110 | <hr> | |
111 | <h2>Resource Variables</h2> | |
112 | ||
113 | <p>N/A | |
114 | </p> | |
115 | ||
116 | <!-- *************************************************************** --> | |
117 | <hr> | |
118 | <h2>Examples</h2> | |
119 | ||
120 | <p>The following example changes the base64 decoder to use the | |
121 | MIME::Base64 module (available from CPAN): | |
122 | </p> | |
123 | ||
124 | <pre> | |
125 | <b><MIMEDecoders></b> | |
126 | base64; MIME::Base64::decode_base64; MIME/Base64.pm | |
127 | <b></MIMEDecoders></b> | |
128 | </pre> | |
129 | ||
130 | <!-- *************************************************************** --> | |
131 | <hr> | |
132 | <h2>Version</h2> | |
133 | ||
134 | <p>2.4.4 | |
135 | </p> | |
136 | ||
137 | <!-- *************************************************************** --> | |
138 | <hr> | |
139 | <h2>See Also</h2> | |
140 | ||
141 | <p> | |
142 | <a href="charsetconverters.html">CHARSETCONVERTERS</a>, | |
143 | <a href="mimefilters.html">MIMEFILTERS</a>, | |
144 | <a href="perlinc.html">PERLINC</a> | |
145 | </p> | |
146 | ||
147 | <!-- *************************************************************** --> | |
148 | <hr> | |
149 | <!--x-rc-nav--> | |
150 | <table border=0><tr valign="top"> | |
151 | <td align="left" width="50%">[Prev: <a href="mimeargs.html">MIMEARGS</a>]</td><td><nobr>[<a href="../resources.html#mimedecoders">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next: <a href="mimeexcs.html">MIMEEXCS</a>]</td></tr></table> | |
152 | <!--/x-rc-nav--> | |
153 | <hr> | |
154 | <address> | |
155 | $Date: 2002/07/27 05:13:10 $ <br> | |
156 | <img align="top" src="../monicon.png" alt=""> | |
157 | <a href="http://www.mhonarc.org/" | |
158 | ><strong>MHonArc</strong></a><br> | |
159 | Copyright © 1999, <a href="http://www.earlhood.com/" | |
160 | >Earl Hood</a>, <a href="mailto:mhonarc@mhonarc.org" | |
161 | >mhonarc@mhonarc.org</a><br> | |
162 | </address> | |
163 | ||
164 | </body> | |
165 | </html> |