# This is not optimized in any way yet
sub charnames {
$name = shift;
- $txt = do "unicode/Name.pl" unless $txt;
+ $txt = do "unicore/Name.pl" unless $txt;
my @off;
if ($^H{charnames_full} and $txt =~ /\t\t$name$/m) {
@off = ($-[0], $+[0]);
my $fname = substr $txt, $off[0] + 2, $off[1] - $off[0] - 2;
die "Character 0x$hex with name '$fname' is above 0xFF";
}
- return chr $ord;
+ return pack "U", $ord;
}
sub import {
$^H{charnames_short} = delete $h{':short'};
$^H{charnames_scripts} = [map uc, keys %h];
if (warnings::enabled('utf8') && @{$^H{charnames_scripts}}) {
- $txt = do "unicode/Name.pl" unless $txt;
+ $txt = do "unicore/Name.pl" unless $txt;
for (@{$^H{charnames_scripts}}) {
warnings::warn('utf8', "No such script: '$_'") unless
$txt =~ m/\t\t$_ (?:CAPITAL |SMALL )?LETTER /;