After trying to read the fine print in what you posted for documentation, I see they correctly insert a DLE/escape character in front of any character in the text that may be interpreted as a control character, ie. STX, or ETX.
So while moving each byte you read to the array, look for a DLE character and do not store the first DLE of a pair of characters. But, if the DLE comes before a second DLE, do store the second DLE in the buffer. I know that seems complicated, and it is, but that is what we have to work with.
Paul