perl-unicode

FW: Utf8 encoding

2007-10-26 08:02:15
Hello,
        Please ignore my previous mail. I found out that previously when I had 
edited this file, I had not written back in utf8 encoded format, but just using 
toString module.
        Gotcha!!

-Shashi

______________________________________________ 
From:         Vajramatti Shashidhar (DS/EES1)  
Sent: Friday, October 26, 2007 12:03 PM
To:   'perl-unicode(_at_)perl(_dot_)org'
Subject:      Utf8 encoding

Hello,
      I am parsing an xml file using libxml2. The xml file has umlauts(german 
keys ü/ö/ä etc) , °(degree) atc as the characters.
      Could someone tell me how to encode such an xml to utf8? 

      I get the below error:
      "parser error : Input is not proper UTF-8, indicate encoding !"

      Below is the snippet of code that I used.

      my $parser = "";
      my $doc = "";

      $parser = XML::LibXML->new();#  
      $doc = $parser->parse_file( $x_file );

      I tried to encode using "setEncoding" but no results.

-Shashi
<Prev in Thread] Current Thread [Next in Thread>