Jcode is a Japanese Charset Handler.
Jcode::convert($str, $ocode, $icode, "z");
# or OOP!
print Jcode->new($str)->h2z->tr($from, $to)->utf8;
< Japanese document is now available as Jcode::Nihongo. >
Jcode.pm supports both object and traditional approach. With object approach, you can go like;
$iso_2022_jp = Jcode->new($str)->h2z->jis;
Which is more elegant than:
$iso_2022_jp = $str;
&jcode::convert($iso_2022_jp, 'jis', &jcode::getcode($str), "z");
For those unfamiliar with objects, Jcode.pm still supports getcode() and convert().
If the perl version is 5.8.1, Jcode acts as a wrapper to Encode, the standard charset handler module for Perl 5.8 or later.