Gentoo Archives: gentoo-perl

From: Subramani R <subramani95@×××××.com>
To: gentoo-perl@l.g.o
Subject: [gentoo-perl] "Malformed UTF-8 character...." warning in perl-5.8.8-r4
Date: Mon, 21 Jan 2008 18:54:07
Message-Id: 95a1084b0801211054w6cd9c0bbo8634cf11f6929c86@mail.gmail.com
1 Hi all,
2
3 I installed the latest version of Perl (perl-5.8.8-r4) in my system
4 and ran the following code:-
5 <code>
6 #!/usr/bin/perl -T
7 use warnings;
8 my @w;
9 local $SIG{__WARN__}=sub{push @w,"@_"};
10 my $c=qq(\x{DF});
11 if ($c=~/${c}|\x{100}/)
12 {
13 print "ASCII pattern that really is utf8";
14 }
15 print "@w\n";
16 if (@w==0)
17 {
18 print "No warnings";
19 }
20 </code>
21
22 I am getting the following output:-
23 "Malformed UTF-8 character (unexpected non-continuation byte 0x7c,
24 immediately after start byte 0xdf) in regexp compilation at ./test.pl
25 line 6."
26
27 As per this reference
28 (http://search.cpan.org/~nwclark/perl-5.8.8/pod/perl588delta.pod) this
29 warning should not come.
30 <snip>
31 "Some case insensitive matches between UTF-8 encoded data and 8 bit
32 regexps, and vice versa, could give malformed character warnings.
33 These have been fixed by Dave Mitchell and Yves Orton."
34 </snip>
35
36 I don't have any clue, why I am getting this warning? I tried the same
37 code in "perl-5.8.8-r2" also and got the same output.
38
39 Any pointers/clues/* would be helpful.
40
41 Thanks in advance,
42 --- R * Subramani ---
43 --
44 gentoo-perl@l.g.o mailing list