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

http://www.tony-franks.co.uk/UTF-8.htm


Prabu Ayyappan <prabu.ayyappan@xxxxxxxxx> wrote:
Hi,

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

äT©imes

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
/Parser.pm line 187

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

http://www.tony-franks.co.uk/UTF-8.htm

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



Thanks in advance,
Prabu.M.A


---------------------------------
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.

Relevant Pages

  • Re: Cant enter UTF-8 characters in VIM, but echo in shell works
    ... which I hope is the correct UTF8 encoding). ... It looks like vim interprets the UTF-8 character I ... Probably something to do with terminals and keyboards and Option keys. ...
    (comp.editors)
  • character Encoding in perl
    ... $myHash = XMLin; ... There is a character which makes the parser to threw an error. ... How to encode these characters.I found this character as an utf-8 character from the below link ...
    (perl.beginners)
  • character Encoding in perl
    ... $myHash = XMLin; ... There is a character which makes the parser to threw an error. ... How to encode these characters.I found this character as an utf-8 character from the below link ...
    (perl.beginners)
  • Simple high-ascii character encoding
    ... I have an Html document that declares that it uses the utf-8 character ... As this document is editable via a web interface I need to make ... language allows me to get the ascii value for any individual character ...
    (comp.infosystems.www.authoring.html)
  • Re: output ampersand using XML::Twig
    ... XML data, then it receives unescaped utf8 strings from the parser ... first 2 solutions) being to get the unicode character for   ... turn off XML escapes for the element content ... {# use an Encode output filter that encodes (using decimal ...
    (comp.lang.perl.modules)