# Trying to use the degree symbol

**URL:** <https://forum.inductiveautomation.com/t/trying-to-use-the-degree-symbol/8868>\
**Category:** Ignition\
**Created:** [August 6, 2014, 6:22pm UTC](https://forum.inductiveautomation.com/t/trying-to-use-the-degree-symbol/8868 "2014-08-06T18:22:28Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![J.Kersey](https://avatars.discourse-cdn.com/v4/letter/j/5daacb/32.png) [@J.Kersey](https://forum.inductiveautomation.com/u/J.Kersey)\
**Post date:** [August 6, 2014, 6:22pm UTC](https://forum.inductiveautomation.com/t/trying-to-use-the-degree-symbol/8868/1 "2014-08-06T18:22:28Z")

</div>

I have come into a problem when trying to use the degree symbol with tags. I have seen that the decimal representation for degree sign is 176. But when I use unichr(176), Instead of getting the actual degree symbol, I get this weird looking A in front of the degree symbol as shown, Â°. Is there a way to just get the degree sign itself?

---

<div class="post-metadata">

**Author:** ![Duffanator](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/duffanator/32/3560_2.png) [@Duffanator](https://forum.inductiveautomation.com/u/Duffanator)\
**Post date:** [August 6, 2014, 8:20pm UTC](https://forum.inductiveautomation.com/t/trying-to-use-the-degree-symbol/8868/2 "2014-08-06T20:20:03Z")

</div>

Hold down ALT and press 248 on the numeric keypad, then release ALT. That will put in the degree symbol.

---

<div class="post-metadata">

**Author:** ![Paullys50](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paullys50/32/3324_2.png) [@Paullys50](https://forum.inductiveautomation.com/u/Paullys50)\
**Post date:** [August 7, 2014, 1:34am UTC](https://forum.inductiveautomation.com/t/trying-to-use-the-degree-symbol/8868/3 "2014-08-07T01:34:51Z")

</div>

SOB…I knew there had to be easier way just never bothered to Google it.

[alt-codes.net/](http://www.alt-codes.net/)

Bookmarked and printed!

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [August 7, 2014, 10:39am UTC](https://forum.inductiveautomation.com/t/trying-to-use-the-degree-symbol/8868/4 "2014-08-07T10:39:13Z")

</div>

Here’s a single-sheet cheat sheet. (Say that one quickly…)

[http://usefulshortcuts.com/downloads/ALT-Codes.pdf](http://usefulshortcuts.com/downloads/ALT-Codes.pdf)

---

<div class="post-metadata">

**Author:** ![Duffanator](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/duffanator/32/3560_2.png) [@Duffanator](https://forum.inductiveautomation.com/u/Duffanator)\
**Post date:** [August 7, 2014, 11:29am UTC](https://forum.inductiveautomation.com/t/trying-to-use-the-degree-symbol/8868/5 "2014-08-07T11:29:42Z")

</div>

Yes, very useful. The best is when I write e-mails with all kinds of weird symbols and people always ask me how I do it. haha.

---

<div class="post-metadata">

**Author:** ![SeanT](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@SeanT](https://forum.inductiveautomation.com/u/SeanT)\
**Post date:** [August 7, 2014, 2:16pm UTC](https://forum.inductiveautomation.com/t/trying-to-use-the-degree-symbol/8868/6 "2014-08-07T14:16:43Z")

</div>

Steps to reproduce issue in script playground:

`print unicode("°")
print unichr(176)
print ord("°")`

…the first two print Â° and the third errors with: “TypeError: ord() expected a character, but string of length 2 found”

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [August 7, 2014, 4:26pm UTC](https://forum.inductiveautomation.com/t/trying-to-use-the-degree-symbol/8868/7 "2014-08-07T16:26:34Z")

</div>

Actually not seeing that, Sean. What locale are you using?

EDIT: Should say I’m seeing the last example you posted but not the others.

EDITED EDIT: Scratch that. I can see this on my 7.6.6 install running under Windows, but not My 7.7 install running under Linux.

FINAL EDIT to the EDITED EDIT that I edited before (anyone else getting lost?): Let me throw 7.6 on another Linux VM and see what we get. Stay tuned!

---

<div class="post-metadata">

**Author:** ![SeanT](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@SeanT](https://forum.inductiveautomation.com/u/SeanT)\
**Post date:** [August 7, 2014, 8:49pm UTC](https://forum.inductiveautomation.com/t/trying-to-use-the-degree-symbol/8868/8 "2014-08-07T20:49:04Z")

</div>

Previous post was running 7.6.6 on Win7-64

I just tested with 7.7 on Win7-64 and get the same result as you, Jordan - unichr and unicode examples both work in script playground, but ord still fails.

However, I still get the incorrect text when used in the actual project. We have three character value tags (int) coming from a controller - we use a project script to convert to characters for display in various tables and text fields. The text in all of these components is still “Â°”, despite a print in the project script properly showing just “°”.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [August 8, 2014, 1:48pm UTC](https://forum.inductiveautomation.com/t/trying-to-use-the-degree-symbol/8868/9 "2014-08-08T13:48:17Z")

</div>

Has anyone tried it in html?

```auto
outputString='<html>'+value+'&#176'
```

Attached is a quickie window to illustrate. Script is in the Numeric Entry component.  
[Degrees Label\_2014-08-08\_0945.proj](https://us1.discourse-cdn.com/inductiveautomation/original/2X/0/05ec87279d8c631a2aa3f1db69618ba0ebb8c512.proj) (5.01 KB)

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [August 8, 2014, 2:19pm UTC](https://forum.inductiveautomation.com/t/trying-to-use-the-degree-symbol/8868/10 "2014-08-08T14:19:57Z")

</div>

SeanT, can you post a SSCCE project showing this problem, or give me some exact steps to replicate? I’d like to get it corrected if I can.

Just for the record, the way to print/display any string outside of 7-bit ASCII (ie with a character code \> 127) is

`print u'°'`It’s stupid, but that’s the Python spec, and we made some changes in 7.6.4 to hold to the spec better (to support non-English languages). It doesn’t hurt to put the u in front of every string, even if it only contains 7-bit ASCII. Python doesn’t have consistent support for the unicode() construct, so I would advise going with u’somestring’ instead.

---

<div class="post-metadata">

**Author:** ![saurabhambildhuke08](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@saurabhambildhuke08](https://forum.inductiveautomation.com/u/saurabhambildhuke08)\
**Post date:** [September 26, 2018, 10:04am UTC](https://forum.inductiveautomation.com/t/trying-to-use-the-degree-symbol/8868/11 "2018-09-26T10:04:15Z")

</div>

I have written a script  
data.append([“Floating”, “Higher make Floating”, “PV4”, ‘°C’])  
data.append([“Measure”, “T° Measure”, “PV5”, ‘°F’])  
data.append([“Setpoint”, “T° Setpoint”, “ED2”, ‘°F’])  
so here how do i filter the isssue of ° symbol because i cant write print u’ ° ’ as have 15 line of code with ° symbol.

---

<div class="post-metadata">

**Author:** ![n.meluccio](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/n.meluccio/32/4858_2.png) [@n.meluccio](https://forum.inductiveautomation.com/u/n.meluccio)\
**Post date:** [October 2, 2018, 6:54am UTC](https://forum.inductiveautomation.com/t/trying-to-use-the-degree-symbol/8868/12 "2018-10-02T06:54:47Z")

</div>

> data =   
> data.append(["Floating", "Higher make Floating", "PV4", u'°C'])  
> data.append(["Measure", u"T° Measure", "PV5", u'°F'])  
> data.append(["Setpoint", u"T° Setpoint", "ED2", u'°F'])

> for x in data:  
> &nbsp;&nbsp;for y in x:  
> &nbsp;&nbsp;&nbsp;&nbsp;if u'°' in y:  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print y

// Output:

> 

°C  
T° Measure  
°F  
T° Setpoint  
°F

>

---

<div class="post-metadata">

**Author:** ![Carter\_Wente](https://avatars.discourse-cdn.com/v4/letter/c/f475e1/32.png) [@Carter\_Wente](https://forum.inductiveautomation.com/u/Carter_Wente)\
**Post date:** [February 22, 2024, 9:45pm UTC](https://forum.inductiveautomation.com/t/trying-to-use-the-degree-symbol/8868/13 "2024-02-22T21:45:13Z")

</div>

Just tried using u'°' and it didn't work in my scenario. I'm currently using 8.1.36 and am trying to get the degree symobol to show properly in a flex repeater. It shows up correctly in a normal flex view on a label text but gets Â° when being repeated.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/4/64e03d7281d29da9ca6f86255175f3dd4ceb97c2.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/d/bdcbe94a78da6417fc6f94201e0a55765aab08d8.png)

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [February 22, 2024, 10:13pm UTC](https://forum.inductiveautomation.com/t/trying-to-use-the-degree-symbol/8868/14 "2024-02-22T22:13:24Z")

</div>

I've had to use the HTML code for my use cases (`&#176`), or you could try using `&#8457` for °F

---

<div class="post-metadata">

**Author:** ![Carter\_Wente](https://avatars.discourse-cdn.com/v4/letter/c/f475e1/32.png) [@Carter\_Wente](https://forum.inductiveautomation.com/u/Carter_Wente)\
**Post date:** [February 23, 2024, 2:32pm UTC](https://forum.inductiveautomation.com/t/trying-to-use-the-degree-symbol/8868/15 "2024-02-23T14:32:30Z")

</div>

@ryan.white Can you use html in a script transform or an exprssion binding for perspective? Could you provide an exmaple of how? I tried within the text label and the binding to get it to show to no avail.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [February 23, 2024, 2:40pm UTC](https://forum.inductiveautomation.com/t/trying-to-use-the-degree-symbol/8868/16 "2024-02-23T14:40:44Z")

</div>

If you're going to use HTML then use HTML entities which are easy to remember.

`&deg;` : °  
`&pm;` : ±  
`&Omega;`: Ω  
`&omega;`: ω.  
`&mu;`: μ.  
`&ge;` : ≥.  
`&le;` : ≤.  
`&times;` : ×. (It's different to 'x', so it's a technical expert indicator.)  
There are hundreds and hundreds ...

You may also be able to use, for example, `<sup>8</sup>`, 8, and `<sub>5</sub>`, 5.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [February 23, 2024, 3:23pm UTC](https://forum.inductiveautomation.com/t/trying-to-use-the-degree-symbol/8868/17 "2024-02-23T15:23:19Z")

</div>

If I create a view with just a label and bind its text to an input parameter, then use it in a flex repeater populated with this:

```python
def transform(self, value, quality, timestamp):
	return [
		{'val': '°'},
		{'val': u'°'},
	]

```

I get this:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/a/3a4d4490b1b0f7877c08be04dc04224e8a129ff6.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/9/693f88a0ddb58743511513f6f628bad3b58cfcab.png)

Maybe you can try passing unicode to your repeated view ?

---

<div class="post-metadata">

**Author:** ![Carter\_Wente](https://avatars.discourse-cdn.com/v4/letter/c/f475e1/32.png) [@Carter\_Wente](https://forum.inductiveautomation.com/u/Carter_Wente)\
**Post date:** [February 26, 2024, 2:34pm UTC](https://forum.inductiveautomation.com/t/trying-to-use-the-degree-symbol/8868/18 "2024-02-26T14:34:34Z")

</div>

Thank you, that did the trick.

---

<div class="post-metadata">

**Author:** ![srija\_somisetty](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@srija\_somisetty](https://forum.inductiveautomation.com/u/srija_somisetty)\
**Post date:** [May 21, 2024, 10:05am UTC](https://forum.inductiveautomation.com/t/trying-to-use-the-degree-symbol/8868/19 "2024-05-21T10:05:06Z")

</div>

> [@JordanCClark](#):
>
> `'<html>'+value+'&#176'`

Hello,  
I am trying same for perspective but i am not getting any symbol can you please guide.  
Thank you.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [May 22, 2024, 4:42pm UTC](https://forum.inductiveautomation.com/t/trying-to-use-the-degree-symbol/8868/20 "2024-05-22T16:42:10Z")

</div>

Well, What I posted was for Vision, not perspecive, and you have not shown how you are trying to use it.

More detail, please.

[Next page](https://forum.inductiveautomation.com/t/trying-to-use-the-degree-symbol/8868.md?page=2)
