Search code examples
chess

How to print a chess piece(unicode) in c#?


i saw a question about this subject before i posted it and i tried everthing they suggested, didn't work.(How to write Unicode characters to the console?) this is the code:

        static void Main(string[] args)
    {
        Console.OutputEncoding = Encoding.UTF8;
        Console.WriteLine("\u2654");
        Console.Read();
    }

and that's what i get in the console: https://gyazo.com/682aa298f5d55d1a037bf1d12ef910b1 . i expected a king symbol at the console. anyone can help?


Solution

  • It's possible that your choice of Console font does not support that particular character. Click on the Windows Toolbar Menu and select Properties -> Font. Try some other fonts to see if they display your character properly. With MS Gothic

    MS Gothic