p4raw-id: //depot/perl@12804
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 {
The C<\x..> and C<\0...> in regular expressions are not affected by
this pragma. They very probably should.
-The charnames pragma ("\N{LATIN SMALL SHARP LETTER S}") does not work
-with this pragma.
-
=head1 SEE ALSO
L<perlunicode>, L<Encode>
-print "1..9\n";
+print "1..10\n";
use encoding "latin1"; # ignored (overwritten by the next line)
use encoding "greek"; # iso 8859-7 (no "latin" alias, surprise...)
# the first octet of UTF-8 encoded 0x3af
print "not " unless unpack("C", chr(0xdf)) == 0xce;
print "ok 9\n";
+
+# charnames must still work
+use charnames ':full';
+print "not " unless ord("\N{LATIN SMALL LETTER SHARP S}") == 0xdf;
+print "ok 10\n";
+