summaryrefslogtreecommitdiff
path: root/t/lib
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-04-06 16:41:06 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-04-06 16:41:06 +0000
commitc867b36081026b7a72e449b72b5b9916973f9bf1 (patch)
treef6fcb143698c8b8f947a0028f8838bb476b2b2fb /t/lib
parent37361303e31c2073b3e9c4c5bce1a4cc42832f83 (diff)
downloadperl-c867b36081026b7a72e449b72b5b9916973f9bf1.tar.gz
As noted by Philip Newton: nothing wrong with BOM,
but 0xFFFE quite wrong. p4raw-id: //depot/perl@15762
Diffstat (limited to 't/lib')
-rw-r--r--t/lib/warnings/utf836
1 files changed, 30 insertions, 6 deletions
diff --git a/t/lib/warnings/utf8 b/t/lib/warnings/utf8
index 5cd0e051b3..6635f02d75 100644
--- a/t/lib/warnings/utf8
+++ b/t/lib/warnings/utf8
@@ -38,75 +38,99 @@ my $d7ff = chr(0xD7FF);
my $d800 = chr(0xD800);
my $dfff = chr(0xDFFF);
my $e000 = chr(0xE000);
+my $feff = chr(0xFEFF);
my $fffd = chr(0xFFFD);
+my $fffe = chr(0xFFFE);
my $ffff = chr(0xFFFF);
my $hex4 = chr(0x10000);
my $hex5 = chr(0x100000);
+my $maxm1 = chr(0x10FFFE);
my $max = chr(0x10FFFF);
no warnings 'utf8';
my $d7ff = chr(0xD7FF);
my $d800 = chr(0xD800);
my $dfff = chr(0xDFFF);
my $e000 = chr(0xE000);
+my $feff = chr(0xFEFF);
my $fffd = chr(0xFFFD);
+my $fffe = chr(0xFFFE);
my $ffff = chr(0xFFFF);
my $hex4 = chr(0x10000);
my $hex5 = chr(0x100000);
+my $maxm1 = chr(0x10FFFE);
my $max = chr(0x10FFFF);
EXPECT
UTF-16 surrogate 0xd800 at - line 3.
UTF-16 surrogate 0xdfff at - line 4.
-Unicode character 0xffff is illegal at - line 7.
-Unicode character 0x10ffff is illegal at - line 10.
+Unicode character 0xfffe is illegal at - line 8.
+Unicode character 0xffff is illegal at - line 9.
+Unicode character 0x10fffe is illegal at - line 12.
+Unicode character 0x10ffff is illegal at - line 13.
########
use warnings 'utf8';
my $d7ff = pack("U", 0xD7FF);
my $d800 = pack("U", 0xD800);
my $dfff = pack("U", 0xDFFF);
my $e000 = pack("U", 0xE000);
+my $feff = pack("U", 0xFEFF);
my $fffd = pack("U", 0xFFFD);
+my $fffe = pack("U", 0xFFFE);
my $ffff = pack("U", 0xFFFF);
my $hex4 = pack("U", 0x10000);
my $hex5 = pack("U", 0x100000);
+my $maxm1 = pack("U", 0x10FFFE);
my $max = pack("U", 0x10FFFF);
no warnings 'utf8';
my $d7ff = pack("U", 0xD7FF);
my $d800 = pack("U", 0xD800);
my $dfff = pack("U", 0xDFFF);
my $e000 = pack("U", 0xE000);
+my $feff = pack("U", 0xFEFF);
my $fffd = pack("U", 0xFFFD);
+my $fffe = pack("U", 0xFFFE);
my $ffff = pack("U", 0xFFFF);
my $hex4 = pack("U", 0x10000);
my $hex5 = pack("U", 0x100000);
+my $maxm1 = pack("U", 0x10FFFE);
my $max = pack("U", 0x10FFFF);
EXPECT
UTF-16 surrogate 0xd800 at - line 3.
UTF-16 surrogate 0xdfff at - line 4.
-Unicode character 0xffff is illegal at - line 7.
-Unicode character 0x10ffff is illegal at - line 10.
+Unicode character 0xfffe is illegal at - line 8.
+Unicode character 0xffff is illegal at - line 9.
+Unicode character 0x10fffe is illegal at - line 12.
+Unicode character 0x10ffff is illegal at - line 13.
########
use warnings 'utf8';
my $d7ff = "\x{D7FF}";
my $d800 = "\x{D800}";
my $dfff = "\x{DFFF}";
my $e000 = "\x{E000}";
+my $feff = "\x{FEFF}";
my $fffd = "\x{FFFD}";
+my $fffe = "\x{FFFE}";
my $ffff = "\x{FFFF}";
my $hex4 = "\x{10000}";
my $hex5 = "\x{100000}";
+my $maxm1 = "\x{10FFFE}";
my $max = "\x{10FFFF}";
no warnings 'utf8';
my $d7ff = "\x{D7FF}";
my $d800 = "\x{D800}";
my $dfff = "\x{DFFF}";
my $e000 = "\x{E000}";
+my $feff = "\x{FEFF}";
my $fffd = "\x{FFFD}";
+my $fffe = "\x{FFFE}";
my $ffff = "\x{FFFF}";
my $hex4 = "\x{10000}";
my $hex5 = "\x{100000}";
+my $maxm1 = "\x{10FFFE}";
my $max = "\x{10FFFF}";
EXPECT
UTF-16 surrogate 0xd800 at - line 3.
UTF-16 surrogate 0xdfff at - line 4.
-Unicode character 0xffff is illegal at - line 7.
-Unicode character 0x10ffff is illegal at - line 10.
+Unicode character 0xfffe is illegal at - line 8.
+Unicode character 0xffff is illegal at - line 9.
+Unicode character 0x10fffe is illegal at - line 12.
+Unicode character 0x10ffff is illegal at - line 13.