Commit | Line | Data |
---|---|---|
0453d815 | 1 | |
2 | utf8.c AOK | |
3 | ||
0453d815 | 4 | [utf8_to_uv] |
5 | Malformed UTF-8 character | |
6 | my $a = ord "\x80" ; | |
7 | ||
8 | Malformed UTF-8 character | |
9 | my $a = ord "\xf080" ; | |
cb50131a | 10 | <<<<<< this warning can't be easily triggered from perl anymore |
0453d815 | 11 | |
12 | [utf16_to_utf8] | |
13 | Malformed UTF-16 surrogate | |
14 | <<<<<< Add a test when somethig actually calls utf16_to_utf8 | |
15 | ||
16 | __END__ | |
c529f79d | 17 | # utf8.c [utf8_to_uv] |
0453d815 | 18 | use utf8 ; |
19 | my $a = ord "\x80" ; | |
20 | EXPECT | |
0453d815 | 21 | ######## |
c529f79d | 22 | # utf8.c [utf8_to_uv] |
146174a9 | 23 | BEGIN { |
24 | if (ord("\t") == 5) { | |
25 | print "SKIPPED\n# Ebcdic platforms have different \\x constructs."; | |
26 | exit 0; | |
27 | } | |
28 | } | |
0453d815 | 29 | use utf8 ; |
30 | my $a = ord "\x80" ; | |
31 | { | |
4438c4b7 | 32 | use warnings 'utf8' ; |
0453d815 | 33 | my $a = ord "\x80" ; |
4438c4b7 | 34 | no warnings 'utf8' ; |
0453d815 | 35 | my $a = ord "\x80" ; |
36 | } | |
37 | EXPECT | |
146174a9 | 38 | \x80 will produce malformed UTF-8 character; use \x{80} for that at - line 12. |
0453d815 | 39 | ######## |
c529f79d | 40 | # utf8.c [utf8_to_uv] |
0453d815 | 41 | use utf8 ; |
42 | my $a = ord "\xf080" ; | |
43 | EXPECT | |
0453d815 | 44 | ######## |
c529f79d | 45 | # utf8.c [utf8_to_uv] |
146174a9 | 46 | BEGIN { |
47 | if (ord("\t") == 5) { | |
48 | print "SKIPPED\n# Ebcdic platforms have different \\x constructs."; | |
49 | exit 0; | |
50 | } | |
51 | } | |
0453d815 | 52 | use utf8 ; |
53 | my $a = ord "\xf080" ; | |
54 | { | |
4438c4b7 | 55 | use warnings 'utf8' ; |
0453d815 | 56 | my $a = ord "\xf080" ; |
4438c4b7 | 57 | no warnings 'utf8' ; |
0453d815 | 58 | my $a = ord "\xf080" ; |
59 | } | |
60 | EXPECT | |
146174a9 | 61 | \xf0 will produce malformed UTF-8 character; use \x{f0} for that at - line 12. |