From: imiyazaki Date: Sun, 16 Nov 2003 12:56:27 +0000 (+0000) Subject: fix: add utf8::decode for perl 5.8. X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fperl.git;a=commitdiff_plain;h=ea5b50a090bca719edd3f4f2a39740845c1758f3 fix: add utf8::decode for perl 5.8. --- diff --git a/Chise_utils/scripts/sample.pl b/Chise_utils/scripts/sample.pl index 41b5d35..3e27d28 100644 --- a/Chise_utils/scripts/sample.pl +++ b/Chise_utils/scripts/sample.pl @@ -54,6 +54,7 @@ if($opt_help }else{ $char=shift or $char=""; $char=&de_er($char); + utf8::decode($char); } if($opt_mapfrom){ @@ -65,6 +66,7 @@ if($opt_mapfrom){ if($opt_map){ if(&get_db($opt_map)){ foreach $char (sort keys %{$chardb{$opt_map}}){ + utf8::decode($char); if($chardb{$opt_map}->{$char}){ print $char,"\t",$chardb{$opt_map}->{$char},"\n"; } @@ -75,6 +77,7 @@ if($opt_map){ }elsif($opt_rev_map){ if(&get_reverse_db($opt_rev_map)){ foreach $char (sort keys %{$reverse_chardb{$opt_rev_map}}){ + utf8::decode($char); if($reverse_chardb{$opt_rev_map}->{$char}){ print $char,"\t",$reverse_chardb{$opt_rev_map}->{$char},"\n"; }