simplexml_load_string() doesn't like foreign languages

后端 未结 1 1375
挽巷
挽巷 2020-12-22 01:54

I am receiving an XML response which comes through perfectly.

Words such as \"português\" and \"españa\" are correctly formatted.

However, once I have parsed

相关标签:
1条回答
  • 2020-12-22 02:45

    Simple XML always treats text internally as UTF-8 encoded, converting to and from this character set if necessary. To solve your issue either make sure that all output from your app is UTF-8 encoded or convert it to another character set (possibly using utf8decode()).

    0 讨论(0)
提交回复
热议问题