nvivek arrived at this weird notation with angles and ^ followed by a letter by displaying it in vi. Your example program is wrong, it has a literal ^ and N as you neglected to substitute this notation for the original character. When the is corrected, the program predictably bombs out with:
$ perl pm986755.pl Entity: line 9: parser error : PCDATA invalid Char value 14 <CALLERID>&#xA0;jW&#xB7;h&#xAE;&#xF5;&#xBF;&#x8A;7a&#xB7;&#xD8 +;T&#xD9;< + ^
When the character is substituted with the character reference &#x0e;, it also bombs out:
$ perl pm986755.pl Entity: line 9: parser error : xmlParseCharRef: invalid xmlChar value +14 <CALLERID>&#xA0;jW&#xB7;h&#xAE;&#xF5;&#xBF;&#x8A;7a&#xB7;&#xD8;T&# +xD9;&#x0e; + ^
Upgrading the version in the PI to 1.1 does not help. XML-Simple respectively its underlying modules XML::Parser/expat and XML::LibXML/libxml2 cannot deal with XML 1.1!

Your advice was flawed from the beginning, it simply cannot work in the general case. Whatever puts control characters there is apt to also put a chr(0) character. No matter whether plain character or character reference, it's illegal in all versions of XML.


In reply to Re^6: XML::Simple parser error : Input is not proper UTF-8, indicate encoding by daxim
in thread XML::Simple parser error : Input is not proper UTF-8, indicate encoding by nvivek

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.