From: Nick Ing-Simmons Date: Sun, 8 Oct 2000 11:51:26 +0000 (+0000) Subject: Work round the fact that $hash->{$key} does not take into account X-Git-Tag: accepted/trunk/20130322.191538~34017 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=63eec5db8bc2521c5f657c9dcaeb3118fe7432c6;p=platform%2Fupstream%2Fperl.git Work round the fact that $hash->{$key} does not take into account UTF8'ness of $key yet. Thus fromUnicode needs to do $hash->{chr(ord($ch))} so that key is always in the "expected" encoding - i.e. same way we put it in the hash. p4raw-id: //depot/perl@7166 --- diff --git a/ext/Encode/Encode.pm b/ext/Encode/Encode.pm index abcbf36..6af4548 100644 --- a/ext/Encode/Encode.pm +++ b/ext/Encode/Encode.pm @@ -509,7 +509,7 @@ sub fromUnicode while (length($uni)) { my $ch = substr($uni,0,1,''); - my $x = $fmuni->{$ch}; + my $x = $fmuni->{chr(ord($ch))}; unless (defined $x) { last if ($chk);