# Strange character inserted with degrees character

**URL:** <https://forum.inductiveautomation.com/t/strange-character-inserted-with-degrees-character/17185>\
**Category:** Ignition\
**Created:** [March 1, 2018, 7:26pm UTC](https://forum.inductiveautomation.com/t/strange-character-inserted-with-degrees-character/17185 "2018-03-01T19:26:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrogers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mrogers/32/4110_2.png) [@mrogers](https://forum.inductiveautomation.com/u/mrogers)\
**Post date:** [March 1, 2018, 7:26pm UTC](https://forum.inductiveautomation.com/t/strange-character-inserted-with-degrees-character/17185/1 "2018-03-01T19:26:25Z")

</div>

I have a pretty simple function to get an engineering unit based on a description,

```auto
def getEngUnits(desc):
		eu = desc
		if "temp" in desc or "heat" in desc or "cool" in desc:
			eu = "°C"
		elif "pressure" in desc:
			eu = "kPa"
		return eu 

```

Then these go into a dataset, and instead of “°C” its showing “Â°C”. Anyone know why this is being inserted? I’ve tried with single quotes around it in the assignment, but no luck.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 1, 2018, 7:29pm UTC](https://forum.inductiveautomation.com/t/strange-character-inserted-with-degrees-character/17185/2 "2018-03-01T19:29:14Z")

</div>

That suggests that some part of your setup isn’t handling encoding like the other parts. I make an effort to use UTF-8 everywhere to make sure this doesn’t happen.

---

<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:** [March 1, 2018, 7:41pm UTC](https://forum.inductiveautomation.com/t/strange-character-inserted-with-degrees-character/17185/3 "2018-03-01T19:41:16Z")

</div>

° is outside of 8-bit ASCII, so you need to tell Python this is Unicode by doing this:  
`eu = u"°C"`

---

<div class="post-metadata">

**Author:** ![mrogers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mrogers/32/4110_2.png) [@mrogers](https://forum.inductiveautomation.com/u/mrogers)\
**Post date:** [March 1, 2018, 9:12pm UTC](https://forum.inductiveautomation.com/t/strange-character-inserted-with-degrees-character/17185/4 "2018-03-01T21:12:48Z")

</div>

Great, thanks guys! Just tried that and it works great.
