Problems with input when writing other languages in C#

3202 views c#

class Exercise
    static void Main(string[] args)
        String a = Console.ReadLine();
        int b = int.Parse(a);

        if (b % 2 == 0)
            Console.WriteLine("??????? ? ? ?????" );
            Console.WriteLine("??????? ? ???????");


I am unable to enter text in my own languages. Is there a way to import a library or something that can read letters appart from English ones? See the input of the screenshot.

UTF-8 format uses that Cyrillic alphabet.


answered question

Console is the Windows command line, which does not use Unicode. You should make a UWP or other GUI application.

1 Answer


I found it ! Sorry for the spam! I have to add this line to my code.

Console.OutputEncoding = Encoding.UTF8;

posted this

Have an answer?


Please login first before posting an answer.