I receive the input data from the port and store it in a byte array.
No problems with that.
When I try to convert the bytes to a string, it doesnt convert correctly.
It comes back with jumbled characters instead of clean text. The port data
is correct, because I will use a gps viewer app and it displays the correct
strings / input from the port...
code snippet:
byte[] aByte;
aByte = r.Input;
s=System.Text.Encoding.ASCII.GetString(aByte, 0, aByte.Length);
I've also tried other text encodings, but they all return "crap".
Thanks
|