X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=ext%2FEncode%2Flib%2FEncode%2FKR%2F2022_KR.pm;h=f668b56f1cf91c6f76bddeb26ee89d5c53ebae84;hb=ca777f1ce1ff5cad164a769e07ab2e03b14695b6;hp=c71f0e480c00d2213c576b2c957238f4ba2a247f;hpb=44a4342c9f1bf4dd16241a6721340a5828ede477;p=p5sagit%2Fp5-mst-13.2.git diff --git a/ext/Encode/lib/Encode/KR/2022_KR.pm b/ext/Encode/lib/Encode/KR/2022_KR.pm index c71f0e4..f668b56 100644 --- a/ext/Encode/lib/Encode/KR/2022_KR.pm +++ b/ext/Encode/lib/Encode/KR/2022_KR.pm @@ -13,6 +13,8 @@ $obj->Define($canon); sub name { return $_[0]->{name}; } +sub needs_lines { 1 } + sub decode { my ($obj,$str,$chk) = @_; @@ -35,14 +37,14 @@ use Encode::CJKConstants qw(:all); sub iso_euc{ my $r_str = shift; - $$r_str =~ s/$RE{'2022_KR'}//gox; # remove the designator + $$r_str =~ s/$RE{'2022_KR'}//gox; # remove the designator $$r_str =~ s{ # replace chars. in GL \x0e # between SO(\x0e) and SI(\x0f) ([^\x0f]*) # with chars. in GR \x0f } { - my $out= $1; + my $out= $1; $out =~ tr/\x21-\x7e/\xa1-\xfe/; $out; }geox; @@ -51,7 +53,7 @@ sub iso_euc{ sub euc_iso{ my $r_str = shift; - substr($$r_str,0,0)=$ESC{'2022_KR'}; # put the designator at the beg. + substr($$r_str,0,0)=$ESC{'2022_KR'}; # put the designator at the beg. $$r_str =~ s{ # move KS X 1001 chars. in GR to GL ($RE{EUC_C}+) # and enclose them with SO and SI }{