Weird chars when parsing with SimpleXML

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sebastian  Araya

    Weird chars when parsing with SimpleXML

    Hello,


    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!


    cbi.

  • Sjoerd

    #2
    Re: Weird chars when parsing with SimpleXML

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

    Comment

    • Sebastian  Araya

      #3
      Re: Weird chars when parsing with SimpleXML

      That was... thank you!

      cbi.

      Comment

      Working...