Question
How to replace control characters which are included in the read result with any character.
Answer
Using Scripting in Format Data allows you replacing the control characters which are included in the result string with any character.
For this sample, replacing control character 0x1d with pipe (vertical bar).
Reset Configuration of the device and enable Script-Based Formatting, then copy and paste the below code into the Data Formatting Script, overwriting any existing code there.
function onResult (decodeResults, readerProperties, output)
{
if (decodeResults[0].decoded)
{
output.content = "";
for(var i=0; i<decodeResults[0].content.length; i++)
{
if(decodeResults[0].content[i].charCodeAt().toString(16) == "1d")
output.content += "|";
else
output.content += decodeResults[0].content[i];
}
output.content += "\r\n";
}
}