v8.1.22
I have a "template" View I'm embedding into another View which has a Label in it that shows a temperature. Below is the label when editing the template View.
The units show correctly. However when I embed this into another View for display, in the Designer it shows up as °C:
In a standard browser (Chrome) it displays fine, but I'd like to know the reason it displays strangely in the Designer when embedded?
Edit: the template is in my global / parent project.
Edit 2: the binding on the temp label is this:
{
"type": "expr",
"config": {
"expression": "numberFormat({this.custom.pv}, \u00270.0\u0027) + \u0027 °C\u0027"
}
}
I've tried a simple case and I can't get it to go bad with static text in the label
Edit 3: I've successfully reproduced it by binding the template label to:
{
"type": "expr",
"config": {
"expression": "\u0027°C\u0027"
}
}
Edit 4: This displays correctly:
3 Likes
I've had this issue with other symbols:
designer:
browser:
8.1.21, this was also happening in (I think) 8.1.14.
edit:
copy/pasted your binding on a label, and it seems to work fine:
1 Like
it seems its really getting converted into this while in jxbrowser
1 Like
Interestingly, the two strings are different.
Expression binding:
'°C'
produces u'\n\xb0C'
but binding:
char(0186) + 'C'
produces u'\n\xbaC'
ºC °C
You can even see the difference here. The first (char(0186)
) is bolder, while Alt+0186 is lighter
Oh no! I've been using the wrong little o everywhere for the last 12 years
But at least it's masculine .
3 Likes
Haha. It still produces the same thing though with the  at the start if I just do '°C'
though
very weird why it happens in embeded views only xd
maybe it uses a different parser? xd
2 Likes
I guess for now I'll do the weird char(176)
method
much better!
Yea I just replaced my arrows with char(9660)
and char(9658)
too.
Not that it changes much, as the browser rendered them properly, but...
yeah it's a bit gross, but it's better than looking at strange characters all day and having the labels spill onto the next line because of them!
Possibly the same root cause as this other thread:
Hi!
Just updated to 8.1.15 which solved an issue I had. So far, so good. Now I just found a new issue that is pretty easy to recreate.
Tagpaths that contain non-standard letters shows up as “not found” in an Embedded View. Seems to only effect the Designer and everything works when running the project.
[bugreport]
I can see Nick is on Windows; @pascal.fragnoud , are you also on Windows?
1 Like
i got this too and im on windows
The designer is. Not sure if relevant, but ignition is installed on debian.
All Chinese characters from binding in embedded view are broken.
That would be super annoying!
If any of you can try out the workaround(s) here, that would be helpful:
This issue hasn't yet been picked up to be worked on.
I had a typo in my earlier sample; you could try -Dfile.encoding=UTF-8 as a JVM argument to the designer launcher and/or providing the file.encoding property as a wrapper.java.additional property in the ignition.conf file. If the problem is a file encoder being created with default platform encoding somewhere, that would force Java on Windows to use a 'better' charset, which might fix this issue.
I tried both JVM Arguments and ignition.conf, they didn't work.
1 Like
A work around is to pass in the Unicode to the embedded view and then reference that in your view.
1 Like