specify utf8 encoding

this should fix the following known bugs:
 - putting a U+2019 in the config causes it to become corrupted and
   ~double in size every launch
 - scripts become assembled incorrectly and the nbsp after your name in
   the chatbox becomes incorrect
 - the feed panel doesn't show emoji
This commit is contained in:
Max Weber
2020-08-24 09:41:54 -06:00
committed by Adam
parent ca2416a838
commit 431e09588b
32 changed files with 117 additions and 70 deletions

View File

@@ -28,6 +28,7 @@ import com.google.gson.JsonParseException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import net.runelite.http.api.RuneLiteAPI;
@@ -63,7 +64,7 @@ public class FeedClient
}
InputStream in = response.body().byteStream();
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in), FeedResult.class);
return RuneLiteAPI.GSON.fromJson(new InputStreamReader(in, StandardCharsets.UTF_8), FeedResult.class);
}
catch (JsonParseException ex)
{