# Swedish letter conversion

**URL:** <https://forum.inductiveautomation.com/t/swedish-letter-conversion/80438>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 13, 2023, 12:31pm UTC](https://forum.inductiveautomation.com/t/swedish-letter-conversion/80438 "2023-10-13T12:31:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rickard\_Nordwall](https://avatars.discourse-cdn.com/v4/letter/r/46a35a/32.png) [@Rickard\_Nordwall](https://forum.inductiveautomation.com/u/Rickard_Nordwall)\
**Post date:** [October 13, 2023, 12:31pm UTC](https://forum.inductiveautomation.com/t/swedish-letter-conversion/80438/1 "2023-10-13T12:31:11Z")

</div>

Hi,  
I have problems with Swedish letters in Ignitions Perspective module.  
I'm working on a project where the customer wants the Swedish letters å, ä & ö to be displayed.  
I use widgets in a dashboard to display machine status along with machine name (which sometimes inlude å,ä or ö). I let every operator create there personal dashboard and save the changes into a database with a change script on the "widgets" props of the dashboard component;  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/5/45379d24b730f602fad9d1e0d55672f71769991c.png)

To view a personal dashboard I just do query to the database to retrieve it.  
And use the deserilize function to display the widgets again.  
However this store and retrieve procedure doesn't seems to support utf-8, letters å,ä & ö gets jumbled up. Though that an easy way to solve this would be to use the .replace function on the string. Which works fine for ä & å but not ö.  
In the picture below I've tried to fit everything into the same picture, just to show what goes wrong;

 ![toIgnition2](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/e/1e1e6f86e706b213b267c85a742a38b9bcd9dd06.png)  
Is this a bug in Ignition or what goes wrong here?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 13, 2023, 12:37pm UTC](https://forum.inductiveautomation.com/t/swedish-letter-conversion/80438/2 "2023-10-13T12:37:36Z")

</div>

Two issues I can see right away:

- You are not prefixing your python string constants when unicode characters are present. Should be `u"ö"` instead of plain `"ö"`. (Basic requirement of python2.)

- You are using the `str()` function. In python2, this does not respect unicode characters. Use the `unicode()` function instead.

---

<div class="post-metadata">

**Author:** ![Rickard\_Nordwall](https://avatars.discourse-cdn.com/v4/letter/r/46a35a/32.png) [@Rickard\_Nordwall](https://forum.inductiveautomation.com/u/Rickard_Nordwall)\
**Post date:** [October 13, 2023, 12:49pm UTC](https://forum.inductiveautomation.com/t/swedish-letter-conversion/80438/3 "2023-10-13T12:49:54Z")

</div>

Thanks a lot! That solved the issue!
