diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-03-18 04:21:43 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-03-18 04:21:43 +0000 |
commit | e1992b6d91e50ab66a903c570e8d9c48f121f34b (patch) | |
tree | e0bffe3d06aa60906e366a622649eec86e005dd4 /t | |
parent | ee3551f533b296608640db86150c800bdb4e3f24 (diff) | |
download | perl-e1992b6d91e50ab66a903c570e8d9c48f121f34b.tar.gz |
make "\N{...}" enable utf8-ness correctly
p4raw-id: //depot/perl@5797
Diffstat (limited to 't')
-rw-r--r-- | t/lib/charnames.t | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/t/lib/charnames.t b/t/lib/charnames.t index f4d95771c0..a6fe47f305 100644 --- a/t/lib/charnames.t +++ b/t/lib/charnames.t @@ -8,7 +8,7 @@ BEGIN { } $| = 1; -print "1..5\n"; +print "1..10\n"; use charnames ':full'; @@ -44,7 +44,6 @@ $encoded_alpha = "\316\261"; $encoded_bet = "\327\221"; { use charnames ':full'; - use utf8; print "not " unless "\N{CYRILLIC SMALL LETTER BE}" eq $encoded_be; print "ok 4\n"; @@ -55,3 +54,17 @@ $encoded_bet = "\327\221"; eq "$encoded_be,$encoded_alpha,$encoded_bet"; print "ok 5\n"; } + +{ + use charnames ':full'; + print "not " unless "\x{263a}" eq "\N{WHITE SMILING FACE}"; + print "ok 6\n"; + print "not " unless length("\x{263a}") == 1; + print "ok 7\n"; + print "not " unless length("\N{WHITE SMILING FACE}") == 1; + print "ok 8\n"; + print "not " unless sprintf("%vx", "\x{263a}") eq "263a"; + print "ok 9\n"; + print "not " unless sprintf("%vx", "\N{WHITE SMILING FACE}") eq "263a"; + print "ok 10\n"; +} |