I\'m trying to load an XML source from a remote location, so i have no control of the formatting. Unfortunately the XML file I\'m trying to load has no encoding:
<
I ran in to a similar situation. I was getting an XML file that was supposed to be UTF-8 encoded, but it included some bad ISO characters.
I wrote the following code to encode the bad characters to UTF-8
load($filename);
?>
I posted about the solution in more detail at: http://dev.strategystar.net/2012/01/convert-bad-characters-to-utf-8-in-an-xml-file-with-php/