[IGN-5692]Designer showing °C as °C in Perspective Label in Embedded View

Thanks for trying. I've kicked the internal ticket's priority up, but there's not much more I can do.

Still seeing the same issue in 8.1.21 using label text bound to tag (for value) + view parameter (for units).

In designer the view looks OK on its own.

When embedded in another view using either FlexRepeater or EmbeddedView and viewed within the Designer I see the same issue.

When viewing all the views above in Perspective (browser) they render OK.

Original view (Designer):
image

In Flex Repeater/Embedded View (Designer):
image

Try converting them to unicode before passing them to the view.
I've had this happen in popups, passing literals with accents to the popup view made a mess. Adding a little u in front of it fixed the issue. So you could try converting to unicode.

You could maybe do it in the view itself, who knows ?

I encountered the same problem. Are there any updates on this topic? Has a solution been found?

View - source:

Embaded view:

Hopefully this helps someone at least.

I have found out that something happens when setting perspective properties of components (for example text property of a label) via scripting this exact behavior occurs. For me specifically its for the letters "ŠČŽščž". Took me some time to figure out that if you use the decode() function on these strings, this then work as expected. So for example you would do "stringŠČŽ".decode().

Since these are quite common in my language, when dealing with string I just automatically use decode() regardless of what I expect to be in the string.

Now as far as performance implications go, I have no idea how this affects performance. Someone from IA or someone much smarter than me might be able to shine some light on this.

If you put non-ASCII characters in a jython string constant, like above, it will screw up. Because of its python 2 heritage.

Instead, write jython string constants like so:

u"stringŠČŽ"

That u prefix signals unicode treatment. While there may be bugs in Ignition, string constants with unicode that aren't marked as unicode are programmer errors, not Ignition bugs.

6 Likes

One more solution.
I used Unicode() to fix my issue.

From a script I did:

headersNew.append(str(tagName.value)+'\n('+unicode(str(tagUnit.value))+')')