In debug I do see the characters properly. Why do Visual Studio and System.Console encodings differ ? How to make console's encoding match VS's one ?
There are a couple of posts inquiring about a similar problem, but we are lacking a straightforward answer. I am listing below all the alternatives I tried - which did not work.
Some posts mention that in order to the console print them correctly, you need to have the Console output encoding properly set + have a font that supports the character set in question. I just could not find an answer (if even possible) to change the console's font.
1.Setting Console.OutputEncoding
to UTF8 or to
Encoding.GetEncoding(1255);
In my case I am dealing with hebrew characters.
2.Tried printing the result of
Encoding.GetEncoding(1255).GetString(Encoding.Default.GetBytes(myString))
Again, in debug the strings do display correctly. And yes, I have not much familiarity with the topic of character encoding, and I am hoping this is not required for something as simple as this, displaying non-ascii characters via System.Console.