Convert UTF-8 to ISO 8859-1

Hi all!

Any clue about converting UTF 8 to ISO 8859-1 ?.

I have this XML file with special characters but when i post the information to the DB those special characters transforms and the post goes wrong.

<WSInput>
  <message>
    <name>júan</name>
    <first_surname>pérez</first_surname>
    <second_surname>lalala</second_surname>
    <codPostal>12345</codPostal>
    <id_tag>213131</id_tag>
    <phone_number>12334567890</phone_number>
    <ext_phone_number>00000</ext_phone_number>
    <email>jsjsjs@com</email>
  </message>
  <authorization>
    <servicename>xxxxxxxx</servicename>
    <password>xxxxxxxx</password>
  </authorization>
</WSInput>

i'm using this to encode the whole XML

fixedstring = unescape(encodeURIComponent(xml));

but this is a deprecated library.

Thanks a lot in advance!.

Perhaps the iconv node can help out. Example from another topic.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.