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
Hi all,

I installed the latest version of Perl (perl-5.8.8-r4) in my system
and ran the following code:-
<code>
#!/usr/bin/perl -T
use warnings;
my @w;
local $SIG{__WARN__}=sub{push @w,"@_"};
my $c=qq(\x{DF});
if ($c=~/${c}|\x{100}/)
{
 print "ASCII pattern that really is utf8";
}
print "@w\n";
if (@w==0)
{
    print "No warnings";
}
</code>

I am getting the following output:-
"Malformed UTF-8 character (unexpected non-continuation byte 0x7c,
immediately after start byte 0xdf) in regexp compilation at ./test.pl
line 6."

As per this reference
(http://search.cpan.org/~nwclark/perl-5.8.8/pod/perl588delta.pod) this
warning should not come.
<snip>
"Some case insensitive matches between UTF-8 encoded data and 8 bit
regexps, and vice versa, could give malformed character warnings.
These have been fixed by Dave Mitchell and Yves Orton."
</snip>

I don't have any clue, why I am getting this warning? I tried the same
code in "perl-5.8.8-r2" also and got the same output.

Any pointers/clues/* would be helpful.

Thanks in advance,
--- R * Subramani ---
-- 
gentoo-perl@l.g.o mailing list