Language: c#
Im struggling to convert some data My device sends to PC the humble byte 0xbc(188 decimal) The serial port sees it as the char "?" or 0x3f in hexadecimal i think I have tried all conversion functions. I don't see how 0xbc translates to 0x3f ;
After seeing this I set the encoding of serial port to
ComPort.Encoding = Encoding.ASCII;
but no result; the same thing happens
I have tried
byte[] b=System.Text.Encoding.UTF8.GetBytes(recievedData);
where recievedData is
recievedData = ComPort.ReadExisting();
( recievedData is a string)
Im sure it is a conversion problem but I'm stuck
int c=char.ConvertToUtf32(recievedData,0) //does not work
What to do in order to have 0xbc' string equivalent in recievedData ?