mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Read all files as UTF-8 (#1035)
Fix encoding issues with some languages such as Chinese by forcing UTF-8 everywhere. Configuration files written in ANSI/Latin-1 and other encodings will need conversion.
This commit is contained in:
parent
cf9bc4c3d5
commit
20fb2323a4
9 changed files with 12 additions and 10 deletions
|
|
@ -791,7 +791,7 @@ namespace MinecraftClient
|
|||
{
|
||||
//Read all lines from file, remove lines with no text, convert to lowercase,
|
||||
//remove duplicate entries, convert to a string array, and return the result.
|
||||
return File.ReadAllLines(file)
|
||||
return File.ReadAllLines(file, Encoding.UTF8)
|
||||
.Where(line => !String.IsNullOrWhiteSpace(line))
|
||||
.Select(line => line.ToLower())
|
||||
.Distinct().ToArray();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue