# Â°C when instantiating an UDT with °C as measurement unit

**URL:** <https://forum.inductiveautomation.com/t/a-c-when-instantiating-an-udt-with-c-as-measurement-unit/58671>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [April 21, 2022, 9:03am UTC](https://forum.inductiveautomation.com/t/a-c-when-instantiating-an-udt-with-c-as-measurement-unit/58671 "2022-04-21T09:03:56Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Davide3i](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/davide3i/32/27811_2.png) [@Davide3i](https://forum.inductiveautomation.com/u/Davide3i)\
**Post date:** [April 21, 2022, 9:03am UTC](https://forum.inductiveautomation.com/t/a-c-when-instantiating-an-udt-with-c-as-measurement-unit/58671/1 "2022-04-21T09:03:56Z")

</div>

Hello.  
I’m having an issue when instantiating an UDT where a parameter has °C for engineering unit.  
**°C** gets changed to **Â°C** , which I suppose is caused by the fact °C is not interpreted as a UTF-8 character. Any hints?  
I’m using Ignition 8.1.16.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 21, 2022, 7:49pm UTC](https://forum.inductiveautomation.com/t/a-c-when-instantiating-an-udt-with-c-as-measurement-unit/58671/2 "2022-04-21T19:49:46Z")

</div>

What does ‘instantiating’ mean? I made a simple test UDT with `°C` as the parameter value, and it went through fine:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/3/13f41e839b7d321b06cb52a498ed83e4543bdd0b.png)

Overriding also works:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/5/95a01da3c133f5e1e6126d02728342bcf438598c.png)

Are you creating instances/overrides through a script?

---

<div class="post-metadata">

**Author:** ![Davide3i](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/davide3i/32/27811_2.png) [@Davide3i](https://forum.inductiveautomation.com/u/Davide3i)\
**Post date:** [April 22, 2022, 5:48am UTC](https://forum.inductiveautomation.com/t/a-c-when-instantiating-an-udt-with-c-as-measurement-unit/58671/3 "2022-04-22T05:48:37Z")

</div>

Hello @paul-griffith.  
Yep, by “instantiating” (I supposed this was the correct verb, but English is not my first language, sorry for that) I meant creating a new tag starting from an UDT.  
When I make an override through a script I get **Â°C** in the engineering unit, while I get a null value when I simply create a new tag based on my UDT.  
I’m [attaching a video](https://www.mediafire.com/file/8bs450g9o5xn4h6/UDT.mkv/file) to show you my issue (and also my [UDT export](https://www.mediafire.com/file/q94rweq44h45xmm/AX.json/file)).

---

<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:** [April 22, 2022, 11:53am UTC](https://forum.inductiveautomation.com/t/a-c-when-instantiating-an-udt-with-c-as-measurement-unit/58671/4 "2022-04-22T11:53:31Z")

</div>

{ Not watching a video… }  
Paul’s question was clearly driven by the fact that regular string constants in jython will mangle unicode. You need the use unicode strings instead.

```auto
# This will yield a mangled degree symbol
engUnit = '°C'
# This will preserve the degree symbol
engUnit = u'°C'

```

---

<div class="post-metadata">

**Author:** ![Davide3i](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/davide3i/32/27811_2.png) [@Davide3i](https://forum.inductiveautomation.com/u/Davide3i)\
**Post date:** [April 22, 2022, 12:00pm UTC](https://forum.inductiveautomation.com/t/a-c-when-instantiating-an-udt-with-c-as-measurement-unit/58671/5 "2022-04-22T12:00:01Z")

</div>

Hello @pturmel, thanks for your reply.  
And what about having the correct engUnit in the UDT without overriding it using a script? **u’°C’** doesn’t seem to work. The video was just 40 seconds long, though. 🙂

EDIT: I’ve tried your solution in a Tag Event Script, but it still mangles unicode the way I described in my first post. I get: **u’Â°C’**.

---

<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:** [April 22, 2022, 12:14pm UTC](https://forum.inductiveautomation.com/t/a-c-when-instantiating-an-udt-with-c-as-measurement-unit/58671/6 "2022-04-22T12:14:45Z")

</div>

> [@Davide3i](#):
>
> while I get a null value when I simply create a new tag based on my UDT

Ok, I see it. That's a bug.

---

<div class="post-metadata">

**Author:** ![ggross](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ggross/32/12668_2.png) [@ggross](https://forum.inductiveautomation.com/u/ggross)\
**Post date:** [April 25, 2022, 6:44pm UTC](https://forum.inductiveautomation.com/t/a-c-when-instantiating-an-udt-with-c-as-measurement-unit/58671/7 "2022-04-25T18:44:58Z")

</div>

I have been attempting to replicate this via the video and the supplied export and have been unsuccessful. This issue could have something to do with the UDT definition that the `ActualTemperature` UDT member is using (`CM/General/Parameters_Double`) but unfortunately that wasn’t provided in the tag export provided. I did construct my own version based on the definition provided and was still unable to replicate this issue in 8.1.16.

[https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/3/c3b7acfa2af143630e2c0f71337f1d9fc237190e.mp4](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/3/c3b7acfa2af143630e2c0f71337f1d9fc237190e.mp4)

I would like to try and rule out some other issues.

1. What version of the Designer Launcher are you using? This is the application that is used to launch the designer, not the Designer itself.

2. What is the locale and language of the OS your Ignition Gateway and your Client running the Designer set to?

3. Can you provide me with a full export of all of your UDT definitions and not just the `AX_r00` one? You can direct message me them if you don’t want to post them directly to this post.

Thanks,  
Garth

---

<div class="post-metadata">

**Author:** ![Davide3i](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/davide3i/32/27811_2.png) [@Davide3i](https://forum.inductiveautomation.com/u/Davide3i)\
**Post date:** [April 26, 2022, 6:15am UTC](https://forum.inductiveautomation.com/t/a-c-when-instantiating-an-udt-with-c-as-measurement-unit/58671/8 "2022-04-26T06:15:55Z")

</div>

Hello @ggross!

1. The Designer Launcher version is the last one: when I updated to the last version of Ignition, I was prompted to update the Designer Launcher as well. Is there a way to find out the version number?

2. The language and locale of the OS the Gateway is running on is EN-us, while the one where I’m running my Designer is set to IT-it.

3. I’ve sent you an export file with all my UDTs.

Thank you for your help!

---

<div class="post-metadata">

**Author:** ![ggross](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ggross/32/12668_2.png) [@ggross](https://forum.inductiveautomation.com/u/ggross)\
**Post date:** [April 27, 2022, 10:13pm UTC](https://forum.inductiveautomation.com/t/a-c-when-instantiating-an-udt-with-c-as-measurement-unit/58671/9 "2022-04-27T22:13:37Z")

</div>

Thanks for the additional information. Was able to duplicate it. Looks like it has something to do with the parent having a Parameter binding and it being overridden by a string. I have created a bug regarding the issue.

Garth
