# OPC tag string displays �C and not °C

**URL:** <https://forum.inductiveautomation.com/t/opc-tag-string-displays-c-and-not-c/63658>\
**Category:** Ignition\
**Created:** [August 31, 2022, 9:37pm UTC](https://forum.inductiveautomation.com/t/opc-tag-string-displays-c-and-not-c/63658 "2022-08-31T21:37:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsteward](https://avatars.discourse-cdn.com/v4/letter/j/8e7dd6/32.png) [@jsteward](https://forum.inductiveautomation.com/u/jsteward)\
**Post date:** [August 31, 2022, 9:37pm UTC](https://forum.inductiveautomation.com/t/opc-tag-string-displays-c-and-not-c/63658/1 "2022-08-31T21:37:57Z")

</div>

The Logix tag is configured with a STRING10 of ‘$B0C’ which properly displays in Wonderware as °C but in Ignition v8.1.15 it displays as �C.

I can change the PLC value to$C2$B0C ( UTF-8 ) and then it will display properly but this is not a practical solution. As a workaround I changed the binding to an expression to replace �

` replace(tag("TagPath"),"�", "°")`

This is less than ideal as well.  
I’m wondering if this is a bug in Ignition and is there a better approach to fix the problem?

Thanks,  
JJ

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [August 31, 2022, 9:38pm UTC](https://forum.inductiveautomation.com/t/opc-tag-string-displays-c-and-not-c/63658/2 "2022-08-31T21:38:36Z")

</div>

No, not a bug, the driver expects UTF-8 encoded Strings.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [August 31, 2022, 9:40pm UTC](https://forum.inductiveautomation.com/t/opc-tag-string-displays-c-and-not-c/63658/3 "2022-08-31T21:40:34Z")

</div>

A better approach would be to not assemble labels in your PLC, that’s a job for the HMI. The PLC tag should be e.g. a REAL that represents the temperature and you format for display in the HMI however you’d like.

---

<div class="post-metadata">

**Author:** ![jsteward](https://avatars.discourse-cdn.com/v4/letter/j/8e7dd6/32.png) [@jsteward](https://forum.inductiveautomation.com/u/jsteward)\
**Post date:** [August 31, 2022, 9:46pm UTC](https://forum.inductiveautomation.com/t/opc-tag-string-displays-c-and-not-c/63658/4 "2022-08-31T21:46:17Z")

</div>

Thanks for the instant reply Kevin. That explains it.

---

<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:** [September 1, 2022, 2:06am UTC](https://forum.inductiveautomation.com/t/opc-tag-string-displays-c-and-not-c/63658/5 "2022-09-01T02:06:16Z")

</div>

Sadly, the CIP spec calls for single-byte encodings to default to ISO-8859-1, going back about three decades. Logix conforms for backwards compatibility.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [September 1, 2022, 3:49am UTC](https://forum.inductiveautomation.com/t/opc-tag-string-displays-c-and-not-c/63658/6 "2022-09-01T03:49:36Z")

</div>

These aren’t CIP datatypes though, they’re vendor-specific “STRING82” and other custom-length structures.

Either way, we’re treating the bytes from this struct the same way Studio 5000 View does.

CTRL+F for “UTF-8” in [this document](https://literature.rockwellautomation.com/idc/groups/literature/documents/um/9324-um001_-en-d.pdf).
