Skip to content

Commit 2c04586

Browse files
Use UTF-8 charset
1 parent ec51756 commit 2c04586

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/main/java/io/github/almightysatan/jaskl/Resource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,13 @@ public void createIfNotExists() throws IOException {
145145

146146
@Override
147147
public @NotNull Reader getReader() throws IOException {
148-
return new InputStreamReader(url.openStream());
148+
return new InputStreamReader(url.openStream(), StandardCharsets.UTF_8);
149149
}
150150

151151
@Override
152152
public @NotNull Writer getWriter() throws IOException {
153153
try {
154-
return new OutputStreamWriter(url.openConnection().getOutputStream());
154+
return new OutputStreamWriter(url.openConnection().getOutputStream(), StandardCharsets.UTF_8);
155155
} catch (UnknownServiceException e) {
156156
throw new UnsupportedOperationException();
157157
}

0 commit comments

Comments
 (0)