Then convert them using 'ascii' ?indeed they will probably be ascii
I would catch the exception and then print the data to console. 'know the data !' is a prereq for a solution.
You read from a serial line ? When reading data from a serial line, then you might not have complete telegrams but only 'chunks' or even only single bytes. Will be a reliable source of decode from utf-8-errors. Are there telegram start-end markers available which allow to extract complete telegrams out of the byte stream ?
Statistics: Posted by ghp — Fri Mar 15, 2024 11:33 am