mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Fix encoding for Windows 7/8
Old CMD.exe does not handle UTF-8, so UTF-8 is enabled only on Windows 10 and Mono.
This commit is contained in:
parent
ab13a63ba1
commit
6e1ee784d8
1 changed files with 6 additions and 1 deletions
|
|
@ -47,7 +47,12 @@ namespace MinecraftClient
|
|||
ConsoleIO.basicIO = true;
|
||||
args = args.Where(o => !Object.ReferenceEquals(o, args[args.Length - 1])).ToArray();
|
||||
}
|
||||
Console.OutputEncoding = Console.InputEncoding = Encoding.UTF8;
|
||||
|
||||
//Take advantage of Windows 10 / Mac / Linux UTF-8 console
|
||||
if (Environment.Version.Major > 6 || isUsingMono)
|
||||
{
|
||||
Console.OutputEncoding = Console.InputEncoding = Encoding.UTF8;
|
||||
}
|
||||
|
||||
//Process ini configuration file
|
||||
if (args.Length >= 1 && System.IO.File.Exists(args[0]) && System.IO.Path.GetExtension(args[0]).ToLower() == ".ini")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue