0

So I'm trying to make a hiragana quiz but the console doesn't print the character. This is what the Console prints

This is my code. I have searched around but haven't found a solution. I be thankfull for any input or help.

    class Program
{
    static void Main()
    {
        List<Character> myHiraganaLibrary = new List<Character>();
        myHiraganaLibrary = AddHiraganaCharacters();

        Console.WriteLine("This is how you say hello in Japanese: こんにちは");
        Console.ReadKey();
  • The *actual* question is `How can I display Unicode text in the console?. Windows and .NET strings are Unicode. Japanese doesn't require special handling. The *console* on the other hand uses the system locale's encoding by default and needs to be switched to UTF8 explicitly. Beyond that, the console should use a font that includes glyphs for Japanese – Panagiotis Kanavos Sep 12 '20 at 18:43
  • [Does this answer your question?](https://stackoverflow.com/a/54327996/12888024) – aepot Sep 12 '20 at 18:45
  • BTW this is an Old-Windows-Console-only issue [that's getting fixed](https://devblogs.microsoft.com/commandline/windows-command-line-unicode-and-utf-8-output-text-buffer/). Windows Terminal doesn't have this problem. Neither does .NET Core on Mac or Linux - if you run the same code in MacOS you'll get the correct output without having to change the encoding in code – Panagiotis Kanavos Sep 12 '20 at 18:49
  • Have you used a font that includes Japanese characters? Have you read the rest of the duplicate? [One of the answers](https://stackoverflow.com/a/54327996/134204) shows how to display Chinese text. Can you type Japanese text in the console? If the console can't display what you type, there's no way it will display the application's output – Panagiotis Kanavos Sep 12 '20 at 18:50
  • BTW Stack Overflow is an ASP.NET site and this page uses UTF8, just like almost all web sites nowadays. If Japanese needed special handling the text in the code would be mangled – Panagiotis Kanavos Sep 12 '20 at 18:54

0 Answers0