Message-ID: <m366i44ll2.fsf@ak-71.mind.de>
p4raw-id: //depot/perl@8873
}
}
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;
}
$| = 1;
-print "1..14\n";
+print "1..15\n";
use charnames ':full';
$encoded_be = "\320\261";
$encoded_alpha = "\316\261";
$encoded_bet = "\327\221";
+$encoded_deseng = "\360\220\221\215";
sub to_bytes {
pack"a*", shift;
print "ok 14\n";
}
+{
+ use charnames ':full';
+
+ print "not "
+ unless to_bytes("\N{DESERET SMALL LETTER ENG}") eq $encoded_deseng;
+ print "ok 15\n";
+
+}
+