1 package Encode::JP::ISO_2022_JP;
5 use base 'Encode::Encoding';
8 $VERSION = do { my @r = (q$Revision: 0.92 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
10 my $canon = 'iso-2022-jp';
11 my $obj = bless {name => $canon}, __PACKAGE__;
15 # decode is identical to 7bit-jis
20 my ($obj,$str,$chk) = @_;
21 return Encode::decode('7bit-jis', $str, $chk);
24 # iso-2022-jp = 7bit-jis with all x201 (Hankaku) converted to
25 # x208 equivalent (Zenkaku)
29 my ($obj,$str,$chk) = @_;
30 my $euc = Encode::encode('euc-jp', $str, $chk);
31 &Encode::JP::H2Z::h2z(\$euc);
32 return &Encode::JP::JIS::euc_jis(\$euc);