Earl Hood > MHonArc-2.6.18 > MHonArc::UTF8

Download:
MHonArc-2.6.18.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Source   Latest Release: MHonArc-2.6.19

NAME ^

MHonArc::UTF8 - UTF-8 routines for MHonArc

SYNOPSIS ^

  <CharsetConverters override>
  plain;    mhonarc::htmlize;
  default;  MHonArc::UTF8::str2sgml; MHonArc/UTF8.pm
  </CharsetConverters>

  <TextClipFunc>
  MHonArc::UTF8::clip; MHonArc/UTF8.pm
  </TextClipFunc>

DESCRIPTION ^

MHonArc::UTF8 provides UTF-8 related routines for use in MHonArc. The main use of the routines provided is to generate mail archives encoded in Unicode UTF-8.

FUNCTIONS ^

MHonArc::UTF8::to_utf8($data, $from_charset, $to_charset)

Converts $data encoded in $from_charset into UTF-8. $to_charset is ignored since it assumed to be utf-8.

This function is designed to be registered to the TEXTENCODE resource:

  <TextEncode>
  utf-8; MHonArc::UTF8::to_utf8; MHonArc/UTF8.pm
  </TextEncode>
MHonArc::UTF8::str2sgml($data, $charset)

This function is designed to be registered to the CHARSETCONVERTERS resource:

  <CharsetConverters override>
  plain;    mhonarc::htmlize;
  us-ascii; mhonarc::htmlize;
  default;  MHonArc::UTF8::str2sgml; MHonArc/UTF8.pm
  </CharsetConverters>

All data passed in is converted to utf-8 with HTML specials converted into entity references.

MHonArc::UTF8::clip($text, $clip_len, $is_html, $has_tags)

This function is designed to be registered to the TEXTCLIPFUNC resource to have utf-8 strings safely clipped in resource variable expansion:

  <TextClipFunc>
  MHonArc::UTF8::clip; MHonArc/UTF8.pm
  </TextClipFunc>

NOTES ^

SEE ALSO ^

The CHARSETCONVERTERS, TEXTCLIPFUNC, and TEXTENCODE resources in the MHonArc documentation.

VERSION ^

$Id: UTF8.pm,v 1.6 2003/03/05 22:17:15 ehood Exp $

AUTHOR ^

Earl Hood, earl@earlhood.com

MHonArc comes with ABSOLUTELY NO WARRANTY and MHonArc may be copied only under the terms of the GNU General Public License, which may be found in the MHonArc distribution.

syntax highlighting: