diff options
author | SHsuperCM <shsupercm@gmail.com> | 2022-01-17 05:07:02 +0200 |
---|---|---|
committer | SHsuperCM <shsupercm@gmail.com> | 2022-01-17 05:07:02 +0200 |
commit | 28018521d2ee7d6217b28395f01d594ff37c1191 (patch) | |
tree | c1eaf42e2332886f0287b2dfefaeb33187b4be90 | |
parent | f1cec6b7ef6baa980ffc626b1327440d290906e6 (diff) | |
download | CITResewn-28018521d2ee7d6217b28395f01d594ff37c1191.tar.gz CITResewn-28018521d2ee7d6217b28395f01d594ff37c1191.tar.bz2 CITResewn-28018521d2ee7d6217b28395f01d594ff37c1191.zip |
Fixed properties not reading UTF characters
Fixes #95
-rw-r--r-- | src/main/java/shcm/shsupercm/fabric/citresewn/pack/CITParser.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/CITParser.java b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/CITParser.java index 2872c48..974d2ec 100644 --- a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/CITParser.java +++ b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/CITParser.java @@ -11,6 +11,8 @@ import shcm.shsupercm.fabric.citresewn.mixin.core.GroupResourcePackAccessor; import shcm.shsupercm.fabric.citresewn.pack.cits.*; import java.io.InputStream; +import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; import java.util.*; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -89,7 +91,7 @@ public final class CITParser { private CITParser() {} .flatMap(citIdentifier -> { try (InputStream is = resourcePack.open(ResourceType.CLIENT_RESOURCES, citIdentifier)) { Properties citProperties = new Properties(); - citProperties.load(is); + citProperties.load(new InputStreamReader(is, StandardCharsets.UTF_8)); CITConstructor type = REGISTRY.get(citProperties.getProperty("type", "item")); if (type == null) |