# Pasting illegal characters to a tag?

**URL:** <https://forum.inductiveautomation.com/t/pasting-illegal-characters-to-a-tag/49761>\
**Category:** Ignition\
**Tags:** ignition78\
**Created:** [August 10, 2021, 2:57pm UTC](https://forum.inductiveautomation.com/t/pasting-illegal-characters-to-a-tag/49761 "2021-08-10T14:57:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [August 10, 2021, 2:57pm UTC](https://forum.inductiveautomation.com/t/pasting-illegal-characters-to-a-tag/49761/1 "2021-08-10T14:57:19Z")

</div>

Using ignition 7.8.2.

This system has a hand scanner for barcodes set up. We have a UDT for Scanners that normally looks like this -  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/0/101afbcfafb1b84b0560d6ae53c62e2820af06ac.png)

The Data tag is the incoming string data of the barcode. That triggers a tag change which processes the data, and then writes it to HMI\_Ack\_Data\_Rcvd\_Echo to let the PLC know that we in fact got the the data.

Recently however, I guess a malformed barcode was scanned, as it came in to the Data tag with a bunch of unrecognized characters represented by squares. It was attempted to be processed, but when it was written back to HMI\_Ack\_Data\_Rcvd\_Echo, those unrecognized characters were written as question marks, and hence the PLC never realized it got the data back leading to a backup -  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/d/4da4e77536b7a851c823fed2ed6a7613412311d9.png)

I’ve had backups happen like this before and normally the “solution” so to speak is to just copy the string from the Data tag to the HMI\_Ack\_Data\_Rcvd\_Echo tag to simulate the handshaking between server and PLC. However, in this case, I copy the string from Data and paste it into the HMI\_ack\_Data\_Rcvd\_Echo tag, it comes through as ??? instead of squares, and I am back to where I started.

My question is is there a way to paste illegal characters/squares as in the Data tag to the other tag to try to clear this? Also, any ideas on how to avoid this in the future, scripting wise? IE preventing from reading/processing characters from a PLC that I can’t even write back to it? I don’t know what sort of conditional I could even use to prevent this from happening in our tag change script.

---

<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 10, 2021, 3:18pm UTC](https://forum.inductiveautomation.com/t/pasting-illegal-characters-to-a-tag/49761/2 "2021-08-10T15:18:37Z")

</div>

Not really the answer to your question, but this might help people who run into squares or question marks.

The squares and the question marks mean two different things – squares mean the computer understands the character but the font can’t display it. Question marks (sometimes in a black diamond) mean the computer can’t change that particular set of bits to a character it understands (usually an encoding issue, such as trying to open a UTF-8 file in a program expecting CP-1252).

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [August 10, 2021, 3:23pm UTC](https://forum.inductiveautomation.com/t/pasting-illegal-characters-to-a-tag/49761/3 "2021-08-10T15:23:00Z")

</div>

That’s helpful context. So the Ignition server is able to recognize the characters, but cannot display them to me due to a font issue.
