Skip to content

Commit 000377f

Browse files
committed
Force charset to UTF-8
Closes #102
1 parent 746d3fe commit 000377f

File tree

1 file changed

+2
-1
lines changed
  • core/src/main/java/net/shadowfacts/discordchat/core

1 file changed

+2
-1
lines changed

core/src/main/java/net/shadowfacts/discordchat/core/Config.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import net.shadowfacts.shadowlib.util.IOUtils;
1010

1111
import java.io.*;
12+
import java.nio.charset.Charset;
1213
import java.util.Arrays;
1314
import java.util.Collections;
1415
import java.util.List;
@@ -51,7 +52,7 @@ public void save() throws IOException {
5152

5253
ConfigObject toRender = config.root().withOnlyKey("discordchat");
5354
String s = toRender.render(ConfigRenderOptions.defaults().setOriginComments(false).setJson(false));
54-
InputStream in = new ByteArrayInputStream(s.getBytes());
55+
InputStream in = new ByteArrayInputStream(s.getBytes(Charset.forName("UTF-8")));
5556
OutputStream out = new FileOutputStream(file);
5657
IOUtils.copy(in, out);
5758
in.close();

0 commit comments

Comments
 (0)