views:

355

answers:

3

Replacing the Special Character using Perl while i am doing this . I got this error . I just try to merging the 2 xml file using XML::Lib.

parser error : Input is not proper UTF-8, indicate encoding ! Bytes: 0xA3 0x32 0x33 0x6B �23 to c�27 .

What is the issue and how to resolve this this

  • I thought before going to XML Parser , I will replace those special character . But i am not aware of how to acheive this in perl ? or is there any way to turn off this error and complete to merging with properl format

  • i used th recover_silently ( XML LIb parser ), its removed all tags after the issue happened

+3  A: 

Your input file isn't encoded in UTF-8. Convert it to UTF-8 before usage, see for instance this excellent article.

wazoox
I am guessing so too.
Alan Haggai Alavi
+3  A: 

Some links that may be of interest (found by searching):

Alan Haggai Alavi
Yes, the article from perlmonks gives the solution if the input document is properly encoded.
wazoox
+2  A: 
<?xml version="1.0" encoding="iso-8859-1"?>

I have just added this into to the XML File . Then works fine

joe