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?


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

链接地址: http://www.djcxy.com/p/84630.html

上一篇: 坚持minimax算法

下一篇: 如何在c#中打印一个棋子(unicode)?