This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7fb6a87
)
Work round the fact that $hash->{$key} does not take into account
author
Nick Ing-Simmons
<nik@tiuk.ti.com>
Sun, 8 Oct 2000 11:51:26 +0000
(11:51 +0000)
committer
Nick Ing-Simmons
<nik@tiuk.ti.com>
Sun, 8 Oct 2000 11:51:26 +0000
(11:51 +0000)
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
patch
|
blob
|
blame
|
history
diff --git
a/ext/Encode/Encode.pm
b/ext/Encode/Encode.pm
index
abcbf36
..
6af4548
100644
(file)
--- 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);