diff options
author | Andreas König <a.koenig@mind.de> | 2001-02-21 08:05:45 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-02-21 14:24:31 +0000 |
commit | b896c7a5a6c831ac6dcdfa1bf97349e5249a98b7 (patch) | |
tree | bee25b1a23425fba8b4e8ac40c3a404cdb0610dd /lib/charnames.pm | |
parent | 75f9d97acc061d6b37c97f17f5ff3195bd7e6f51 (diff) | |
download | perl-b896c7a5a6c831ac6dcdfa1bf97349e5249a98b7.tar.gz |
fix for charnames above FFFF
Message-ID: <m366i44ll2.fsf@ak-71.mind.de>
p4raw-id: //depot/perl@8873
Diffstat (limited to 'lib/charnames.pm')
-rw-r--r-- | lib/charnames.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/charnames.pm b/lib/charnames.pm index 934fafddd5..0d663082c7 100644 --- a/lib/charnames.pm +++ b/lib/charnames.pm @@ -33,8 +33,10 @@ sub charnames { } } die "Unknown charname '$name'" unless @off; - - my $ord = hex substr $txt, $off[0] - 4, 4; + + my $hexlen = 0; + $hexlen++ while substr($txt, $off[0] - $hexlen - 1, 1) =~ /[0-9a-f]/; + my $ord = hex substr $txt, $off[0] - $hexlen, $hexlen; if ($^H & $bytes::hint_bits) { # "use bytes" in effect? use bytes; return chr $ord if $ord <= 255; |