Bric::Util::CharTrans - Interface to Bricolage UTF-8 Character Translations
$Revision: 1.1.1.1.2.2 $
$Date: 2001/11/06 23:18:34 $
# Constructors.
my $chartrans = Bric::Util::CharTrans->new('iso-8859-1');
# Instance Methods.
my $charset = $chartrans->charset();
my $charset = $chartrans->charset('iso-8859-1');
my $utf8_text = $chartrans->to_utf8($target_text);
my $target_text = $chartrans->from_utf8($utf8_text);
$chartrans->to_utf(\$some_data);
$chartrans->from_utf(\$some_data);
Bric::Util::CharTrans provides an object-oriented interface to conversion of characters from a target character set to Unicode UTF-8 and from Unicode UTF-8 to a target character set.
Throws: errors on invalid or missing character sets
Side Effects:
Notes: Use new() to get a working CharTrans object.
none
to_utf8() operates in one of two ways.
If passed a scalar value it returns utf8 text corresponding to text in $sometext that is encoded in the target character set.
If passed a reference it will recursively process the data within and convert it all to UTF-8
$options may contains localized overrides in the future...
Throws: error on text that does not correspond to the specified input text.
Side Effects: NONE.
Notes: NONE.
Returns utf8 text corresponding to text in $sometext
from_utf8() operates in one of two ways.
If passed a scalar value it returns native charset text corresponding to utf-8 text in $utf8_text.
If passed a reference it will recursively process the data within and convert it all to the target character set.
Silently returns undef if passed undef.
Throws: error on text that does not correspond to the specified input text.
Side Effects: NONE.
Notes: NONE.
Gets the current target character set in use.
Optionally sets the current character set.
Throws: error on bad character set / utf8 combinations.
Side Effects: NONE.
Notes: NONE.
NONE.
NONE.
Paul Lindner <lindner@inuus.com>
perl(1), Bric (2), iconv(3), /usr/bin/iconv
Hey! The above document had some coding errors, which are explained below:
You forgot a '=back' before '=head2'
You forgot a '=back' before '=head2'
=back doesn't take any parameters, but you said =back 4