From 63eec5db8bc2521c5f657c9dcaeb3118fe7432c6 Mon Sep 17 00:00:00 2001 From: Nick Ing-Simmons Date: Sun, 8 Oct 2000 11:51:26 +0000 Subject: [PATCH] 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 --- ext/Encode/Encode.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.7.4