I'm using a Zebra TC70 with DataWedge to capture scanned data. Every barcode I scan is having \r\n appended to the end.
Why is it doing this and how can I stop it?
I'm using a Zebra TC70 with DataWedge to capture scanned data. Every barcode I scan is having \r\n appended to the end.
Why is it doing this and how can I stop it?
Copyright © 2021 Jogjafile Inc.
When you use any barcode reader, they usually come with a manual which include configurations. Like what characters should include after the reading.
For your particular scanner you can check this
The characters \r\n are escape characters indicating a new line.
Sometimes it's there, sometimes it's not, depending on the configuration of the reader.
If it bothers you, you can always replace the unwanted characters by empty characters
myInput.Trim("\r\n".ToCharArray())
orTrimEnd
are other alternatives