# Convert UTF-8 to ISO 8859-1

**URL:** <https://discourse.nodered.org/t/convert-utf-8-to-iso-8859-1/76264>\
**Category:** General\
**Created:** [7 March 2023 21:01 UTC](https://discourse.nodered.org/t/convert-utf-8-to-iso-8859-1/76264 "2023-03-07T21:01:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marty1982](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marty1982/32/20162_2.png) [@Marty1982](https://discourse.nodered.org/u/Marty1982)\
**Post date:** [7 March 2023 21:01 UTC](https://discourse.nodered.org/t/convert-utf-8-to-iso-8859-1/76264/1 "2023-03-07T21:01:01Z")

</div>

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.

```auto
<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!.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [7 March 2023 22:42 UTC](https://discourse.nodered.org/t/convert-utf-8-to-iso-8859-1/76264/2 "2023-03-07T22:42:37Z")

</div>

Perhaps the iconv node can help out. Example from [another topic](https://discourse.nodered.org/t/special-character-conversion-issues/75409/2).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [6 May 2023 22:43 UTC](https://discourse.nodered.org/t/convert-utf-8-to-iso-8859-1/76264/3 "2023-05-06T22:43:18Z")

</div>

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