Unicode Characters Like ° and ² Not Displaying Correctly in Tree Component Labels

Hi,

I'm using the Tree component in Ignition Perspective, and I want to show units like m/s² and °C in the label.

When I type them manually in the Designer, they show correctly.

But when I set the label using a script, they show incorrectly as m/s² or °C.

How can I display these Unicode characters properly through scripting?

Thanks!
Gokulakannan.P

In python, string constants with non-ASCII character's need to have the unicode prefix or the characters will be mangled.

This will work: u"°C" and this will not: "°C".

2 Likes