se utilizzo htmlspecialchar, salvando su xml con simplexml mi da due errori..


Warning: SimpleXMLElement::addAttribute() [simplexmlelement.addattribute]: string is not in UTF-8 in C:\Program Files\...

Warning: SimpleXMLElement::asXML() [simplexmlelement.asxml]: output conversion failed due to conv error, bytes 0xE8 0x22 0x20 0x64 in C:\...

sia il file php che quello xml sono ISO-8859-1.

Come mai mi fa così?