le the flag is to use "utf8::decode()" function.
My sample code is like below:
#!/usr/local/bin/perl -w
use 5.008;
use strict;
use warnings;
open (TXT, ');
close TXT;
print "utf8 flag desabled:\n";
foreach my $text (@text) {
print length($text), "\n";
}
print
HTML:
<http://www.w3.org/MarkUp/>
BTW, when you use numeric character references method, there is no need
to look around any modules. Only to use "unpack('U*', $string)" function
is enough to do.
Please inspect and estimate my sample code which is attached as sample.pl.
ml';
my $remotedoc = get($uri);
$remotedoc =~ m/(.*?)<\/title>/;
my $ISO_8859_1 = $1;
use Encode;
my $Perl_Internal = decode('ISO-8859-1', $ISO_8859_1);
my $UTF8 = encode('UTF8', $Perl_Internal);
print $UTF8;
__END__
--
Masanori HATA
<[EMAIL PROTECTED]>
He's always with us!
or.
I hope there will be good news about the bug fix.
>And you can't use Encode::decode("utf8", ...) in this particular case because
>Encode::decode() checks and clobbers at "Cannot decode string with wide characters".
>Hmm
I see.
Thank you for your hard and
ot treated as a UTF8 string under
the taint mode.
(My system is perl5.8.1 MSWin32-X86-multi-thread)
I would like to know any reasons for this problem.
test.pl
Description: Binary data
--
Masanori HATA
<[EMAIL PROTECTED]>
He's always with us!
Hello,
I have a simple question:
It seems that utf8::decode() does not work for
any tainted variables under the -T (Taint) mode.
Is it right?
Regards,
--
Masanori HATA
<[EMAIL PROTECTED]>
He's always with us!