0

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
  • Please provide the code that produces the error. Commented Jul 6, 2009 at 10:00
  • my $xml2 = $parser->parse_file("new.xml"); Commented Jul 6, 2009 at 10:03
  • please edit the title for something more meaningful (problems with XML encoding, for instance) Commented Jul 6, 2009 at 12:54

3 Answers 3

3

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

Sign up to request clarification or add additional context in comments.

1 Comment

Yes, the article from perlmonks gives the solution if the input document is properly encoded.
3

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

Comments

2
<?xml version="1.0" encoding="iso-8859-1"?>

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.