My application receives Integer Values for ISO 8859-1 Chars over TCP and should display it for testing in the console. For converting the Int/Bytes to ISO 8859-1 strings, I took the code from the accepted answer of this question:
var e = Encoding.GetEncoding("iso-8859-1");
var s = e.GetString(new byte[] { 189 });
Its working fine for example with a value of 189 which is ½ in ISO 8859-1. But in my test, I got a Byte with the value of 154
which is š (Latin small letter S with caron) according to this site.
The Problem is that it doesnt display it on the console, its just displays a Question mark like that:
and the Debugger shows only a plain string:
What could be the error?
Any help will be greatly appreciated.