Switch console window encoding to Unicode

Unicode characters are becoming quite common within minecraft servers (especially the large ones) nowadays. As of now MCC creates a System beep every single time one of these characters are processed by ConsoleIO. 

I'm no expert in C#, so I'm unsure if ANSI is required for anything, but I've been perfectly find with UTF-8 so far.
This commit is contained in:
Barnehhh 2017-09-11 00:11:25 -04:00 committed by ORelio
parent c85352f819
commit 1a2e86e684

View file

@ -45,7 +45,7 @@ namespace MinecraftClient
if (args.Length >= 1 && args[args.Length - 1] == "BasicIO")
{
ConsoleIO.basicIO = true;
Console.OutputEncoding = Console.InputEncoding = Encoding.GetEncoding(System.Globalization.CultureInfo.CurrentCulture.TextInfo.ANSICodePage);
Console.OutputEncoding = Console.InputEncoding = Encoding.UTF8;
args = args.Where(o => !Object.ReferenceEquals(o, args[args.Length - 1])).ToArray();
}