Fix mis-encoding in Windows

This commit is contained in:
huangyuhui
2016-02-08 12:06:39 +08:00
parent fdc2570945
commit cb5391ed28
15 changed files with 54 additions and 210 deletions

View File

@@ -84,6 +84,15 @@ public final class StrUtils {
return false;
}
public static boolean startsWithOne(Collection<String> a, String match) {
if (a == null)
return false;
for (String b : a)
if (startsWith(match, b))
return true;
return false;
}
public static boolean equalsOne(String base, String... a) {
for (String s : a)
if (base.equals(s))

View File

@@ -48,7 +48,7 @@ public class Localization {
this.lang = new HashMap<>();
try {
String[] strings = IOUtils.readFully(is).toString().split("\n");
String[] strings = IOUtils.readFully(is).toString("UTF-8").split("\n");
for (String s : strings)
if (!s.isEmpty() && s.charAt(0) != 35) {
int i = s.indexOf("=");