I am trying to output the Unicode character U + 2717 (BALLOT X) in a Windows console window from a C # program and have not succeeded. No combination of font, output encoding, or anything else seems to work. The font that I use by default (Consolas) can correctly display this character, since it uses the font that I use in Visual Studio, and Visual Studio displays the character correctly. The closest character, U + 2713 (CHECK MARK) is displayed correctly, so I think there is something specific with this character that prevents it from correctly displaying. What could it be?
Example (non-working) code:
System.Console.WriteLine("✗");
Also does not work (failure in the same way, that is, outputs "?"):
System.Console.WriteLine("\u2717");
I tried to set various output encodings:
System.Console.OutputEncoding = System.Text.Encoding.UTF32;
- UTF32 ( .).
- UTF8 ? ( Consolas).
- UTF16 ? ( Consolas).
- , ? . OutputEncoding SBCSCodePageEncoding.