Weird chars when parsing with SimpleXML

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

  I'm using php-5.0.5-pl3; I've created a collector class which
populates itself with DOM's nodes from every object which needs to
output data. So, at the end of the process, the collector has every
piece of the result in a XML document.

  After this, I need to process the XML document according to the user
document request (HTML, XML, Excel, etc.); to accomplish this, I'm
using a SimpleXML to parse every node and reinterpret it.

  I've successfully accomplish HTML transformation, but I've trouble
with Excel because some numeric entities aren't translated properly.
For example:

Importación (Importación) is translated to Importación
Acuática (Acuática) is translated to Acuática
España (España) is translated to España
and so on.

  Is there any function to translate properly the accuted vocals ??

  Thanks in advance!


Re: Weird chars when parsing with SimpleXML

I think your characters are encoded to UTF-8. Use utf8-decode.

Re: Weird chars when parsing with SimpleXML

That was... thank you!


Site Timeline