Convert::Translit 1.03 review

Download
by rbytes.net on

Convert::Translit, transliterate, build_substitutes is a Perl module for string conversion among numerous character sets. SYNOPSIS

License: Perl Artistic License
File size: 78K
Developer: Genji Schmeder
0 stars award from rbytes.net

Convert::Translit, transliterate, build_substitutes is a Perl module for string conversion among numerous character sets.

SYNOPSIS

use Convert::Translit;
$translator = new Convert::Translit($result_chset);
$translator = new Convert::Translit($orig_chset, $result_chset);
$translator = new Convert::Translit($orig_chset, $result_chset, $verbose);

$result_st = $translator->transliterate($orig_st);
$result_st = Convert::Translit::transliterate($orig_st);

build_substitutes Convert::Translit();

Convert::Translit::build_substitutes();

This module converts strings among 8-bit character sets defined by IETF RFC 1345 (about 128 sets). The RFC document is included so you can look up character set names and aliases; it's also read by the module when composing conversion maps. Failing functions or objects return undef value.

Export_OK Functions:

transliterate()
returns a string in $result_chset for an argument string in $orig_chset, transliterating by a map composed by new().

build_substitutes()
rebuilds the file "substitutes" containing character definitions and approximate substitutions used when a character in $orig_chset isn't defined in $result_chset. For example, "Latin capital A" may be substituted for "Latin capital A with ogonek". It takes a long time to rebuild this file, but you should never need to. Its only source of information is file "rfc1345".

Object methods:

new()
creates a new object for converting from $orig_chset to $result_chset, these being names (or aliases) of 8-bit character sets defined in RFC 1345. If only one argument, then $orig_chset is assumed "ascii". If three arguments, the third is verbosity flag. Verbose output lists approximate substitutions and other compromises.

transliterate()
is same as the function of that name.

build_substitutes()
is same as the function of that name.

Requirements:
Perl

Convert::Translit 1.03 keywords