XML not well formed due to long UTF characters

youngstergoku

New Member
Ok, I hope somebody can help because I haven't been able to find a solution for this.In the database, customers managed to import or otherwise add character data from a different character set such as:\[code\] <E2><80><99>\[/code\]I believe this is UTF-16.The XML output of my script is throwing errors due to this data (which pulls strings, such as a "description" field, from the database and builds an XML file).XML Parsing Error: not well-formedLine Number 20, Column 50.There's some other hex that's longer, like <80><99> (just an example, im not sure if this is an actual character).How can I make my XML file valid, and either downscale the character set or get it to use UTF-32 like so:\[code\] AddType "application/xml; charset=UTF-32" xml (in .htaccess file along with filesmatch .xml) <?xml version='1.0' encoding='UTF-32' ?> (placed in head of xml file)\[/code\]
 
Back
Top