Author Topic: loading ASCII-encoded XML fails on characters from the extended set  (Read 213 times)

0 Members and 1 Guest are viewing this topic.

Offline valkyrTopic starter

  • Irregular
  • Posts: 1
    • View Profile
I'm trying to load an ASCII-encoded XML document - a sequential list of the 256 characters and a description of each.

Code: [Select]
$XML = new DomDocument;
$XML->load('../xml/articles/ASCII-character-set.xml');

But the parser spits out an error when it hits the first character from the extended ASCII set (the Euro symbol - € )

Quote
Warning: DOMDocument::load() [domdocument.load]: encoder errorPremature end of data in tag char

Loading the document with SimpleXML gives exactly the same.

How do I get round this?  :-\ I've discovered that the document is always represented as UTF-8 internally, but I'm not really sure how/if that influences my issue...