Degree symbol sensitivity still a problem in 2020?

When entering ‘unit_of_measurement’ we can enter any string <correct?>.
In 2018 using the wrong symbol for the degree symbol caused errors. After two years of updates, I was wondering if any of ALT 248, 167,188,161 cause errors? I think UTF-8 is used now? and not ASCII?
At this time, can any symbol in ‘unit_of_measurement’ cause an error? Thanks.


Should be fine. I use °C as a UOM all the time in HA.
I have come unstuck in the past if the yaml file isn’t set to use UTF-8 though so be aware of that if you’re using yaml…

Thanks David. How do I know if YAML is setup to use UTF-8?

The editor should tell you. I use notepad++ and it shows you in the footer… VSCode might default to that anyway if you use a yaml viewer in there… It will be a setting in most editors I think.

Thanks. I use notepad++ as well. I well check the footer. Merry Christmas.

1 Like

This is the one I use exclusively. As it is the degree symbol. The other’s aren’t.

Alt+167 is the ordinal indicator, though it looks similar it is not the same. Not sure where you go the other codes fro but they look nothing like a degree symbol on my PC (a box section and an accented i).

Funny I have used ALT + 0176 for years…

They appear to be identical symbols. It just takes typing one less character using 248 :slight_smile:

° °

I just got into the habit of that one years ago in Windows 3.0 probably… I almost never type it anyway.

I will use ALT 248 as well Thanks to all for this duscussion.