Question Why cannot output Chinese characters correctly if using dotnet run ?

suyangzuo

New member
Joined
Apr 18, 2022
Messages
3
Location
China
Programming Experience
Beginner
A very simple console app.

C#:
Console.Write("Input your name: ");
string name = Console.ReadLine();
Console.WriteLine(name);

if I run it by dotnet run in vscode or terminal, it get result as below :
CNKHjklp1X.png
jSgJhAkPY6.png


But if I run it by direct double click the .exe, it's works fine:

ufQ2GuWOLW.png
cMKLYHmJh3.png


Just can't figure out why.
 
Back
Top Bottom