So I need to convert a hex string on my server which could contain any byte number from 0-255 into a byte to send it to my client.
This works fine in most situations, but when converting to a byte with any hex between the range of 0x80 and 0x9F it gets switched out for 0x3F (using the Encoding.GetBytes() function on the string).
I understand this is an encoding problem, and currently I'm using the default encoding (which is Windows-1252 in my area). So my question is what encoding could I use to be able to encode all 255 bytes?
It's very important I can send and receive all the bytes correctly without them being converted to 0x3F, as the server handles up to 255 clients which are all assigned a client number as a byte, so if the client number is for example 135 (0x87), it gets sent as 63 (0x3F) which is obviously a big error.