Re: character Encoding in perl

Its not even being displayed in by browser.The UTF-8 Character i meant is the square characters in the Link

Prabu Ayyappan <prabu.ayyappan@xxxxxxxxx> wrote:

I am using XML::Simple for converting the XML into a hash.

use Unicode::String qw(utf8);
use XML::Simple;
#use Data::Dumper;
$XML = "äT©imes";
$u = utf8($XML);
$XML = $u->utf8;
$myHash = XMLin($XML);
#print Dumper($myHash);

The above code works fine...

But the problem is when i used the Input string as


There is a  character which makes the parser to threw an error.

not well-formed (invalid token) at line 1, column 12, byte 12 at D:/Perl/lib/XML
/ line 187

How to encode these characters().I found this character as an utf-8 character from the below link

if it is something other than UTF-8 then how to encode it.

Thanks in advance,

Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV.

Got a little couch potato?
Check out fun summer activities for kids.