|
CHARSETCONVERTERSSyntax
DescriptionThe CHARSETCONVERTERS resource specifies Perl routines to call for filtering characters of a character set to HTML legal characters. The filtering occurs for message header data encoded according to the MIME standard. The following example shows a header with encoded data: From: =?US-ASCII?Q?Keith_Moore?= <moore@cs.utk.edu> To: =?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= <keld@dkuug.dk> CC: =?ISO-8859-1?Q?Andr=E9_?= Pirard <PIRARD@vm1.ulg.ac.be> Subject: =?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?= =?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?= This CHARSETCONVERTERS resource can only be defined via the resource file. Each line of the element specifies a character set, the Perl routine for filtering the character set, and the Perl source file containing the routine. Example: <CharsetConverters> iso-8859-1;MHonArc::CharEnt::str2sgml;MHonArc/CharEnt.pm </CharsetConverters> The first field is the character set specification. The second field is the routine name (which should contain a package qualifier). The third field is the source file the routine is defined. The source file is optional if the routine is known to be define in an already listed source file. There are some special character set specifications. They are as follows:
There are some special character set converter routines values. They are as follows:
Each charset converter function is invoked as follows: $converted_data = &function($data, $charset); The data passed in will already be decoded from quoted-printable or base64 (as specified by the MIME syntax). Therefore, the called routine will be passed the raw byte data. It is important that the routine convert the data into a format suitable to be included in HTML markup. Default Setting<CharsetConverters> plain; mhonarc::htmlize; us-ascii; mhonarc::htmlize; iso-8859-1; mhonarc::htmlize; iso-8859-2; MHonArc::CharEnt::str2sgml; MHonArc/CharEnt.pm iso-8859-3; MHonArc::CharEnt::str2sgml; MHonArc/CharEnt.pm iso-8859-4; MHonArc::CharEnt::str2sgml; MHonArc/CharEnt.pm iso-8859-5; MHonArc::CharEnt::str2sgml; MHonArc/CharEnt.pm iso-8859-6; MHonArc::CharEnt::str2sgml; MHonArc/CharEnt.pm iso-8859-7; MHonArc::CharEnt::str2sgml; MHonArc/CharEnt.pm iso-8859-8; MHonArc::CharEnt::str2sgml; MHonArc/CharEnt.pm iso-8859-9; MHonArc::CharEnt::str2sgml; MHonArc/CharEnt.pm iso-8859-10; MHonArc::CharEnt::str2sgml; MHonArc/CharEnt.pm iso-2022-jp; iso_2022_jp::str2html; iso2022jp.pl latin1; mhonarc::htmlize; latin2; MHonArc::CharEnt::str2sgml; MHonArc/CharEnt.pm latin3; MHonArc::CharEnt::str2sgml; MHonArc/CharEnt.pm latin4; MHonArc::CharEnt::str2sgml; MHonArc/CharEnt.pm latin5; MHonArc::CharEnt::str2sgml; MHonArc/CharEnt.pm latin6; MHonArc::CharEnt::str2sgml; MHonArc/CharEnt.pm windows-1250; MHonArc::CharEnt::str2sgml; MHonArc/CharEnt.pm windows-1252; MHonArc::CharEnt::str2sgml; MHonArc/CharEnt.pm default; -ignore- </CharsetConverters> Resource VariablesN/A ExamplesThe following example specifies to just decode iso-8859-1 character data since it is the default character set used by most browsers: <DecodeHeads> <CharsetConverters> iso-8859-1;-decode- </CharsetConverters> Version2.0 See AlsoDECODEHEADS, MIMEDECODERS, MIMEFILTERS, PERLINC
$Date: 2002/07/27 05:13:10 $ MHonArc Copyright © 1997-2001, Earl Hood, mhonarc@mhonarc.org |