none
How can I output a Chinese character when it's unicode code point greater than 65535? RRS feed

  • Question

  • public static void Main()
    { 
    Console.WriteLine("𠮷");
    }

    I created a C# Console Application and tried output the Chinese character  𠮷(Unicode codepoint 20bb7) in cmd and powershell.
    Unfortunately,cmd and powershell both cannot output the Chinese character correctly(windows 10 build version 1803 and 1809).
    How can I resolve this issue? Thank you.

    Friday, March 29, 2019 3:33 AM

All replies

  • Try follow this example and see if it'll help you out.

    With Win10 1809, there is sure-fire way. However I don't think the code is added to .NET framework yet. Since Console class does not expose the screenbuffer undernearth, you'll have to implement your own I/O routine using P/Invoke if you want to go this way.


    Friday, March 29, 2019 6:17 AM
    Answerer
  • Hi

    Is your problem solved? If so, please post "Mark as answer" to the appropriate answer, so that it will help other members to find the solution quickly if they face a similar issue.

    Best Regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, April 1, 2019 1:25 AM
    Moderator