summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/t/pragma/warn/utf8
blob: 9a7dbafdee84945d965bd8cbb12855442e304205 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

  utf8.c AOK

     [utf8_to_uv]
     Malformed UTF-8 character
	my $a = ord "\x80" ;

     Malformed UTF-8 character
	my $a = ord "\xf080" ;
     <<<<<< this warning can't be easily triggered from perl anymore

     [utf16_to_utf8]
     Malformed UTF-16 surrogate		
     <<<<<< Add a test when somethig actually calls utf16_to_utf8

__END__
# utf8.c [utf8_to_uv] -W
BEGIN {
    if (ord('A') == 193) {
        print "SKIPPED\n# ebcdic platforms do not generate Malformed UTF-8 warnings.";
        exit 0;
    }
}
use utf8 ;
my $a = "snøstorm" ;
{
    no warnings 'utf8' ;
    my $a = "snøstorm";
    use warnings 'utf8' ;
    my $a = "snøstorm";
}
EXPECT
Malformed UTF-8 character (unexpected non-continuation byte 0x73 after start byte 0xf8) at - line 9.
Malformed UTF-8 character (unexpected non-continuation byte 0x73 after start byte 0xf8) at - line 14.
########
OpenPOWER on IntegriCloud