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

@@ -27,6 +27,7 @@ package net.runelite.client.plugins.discord;
import com.google.inject.Guice;
import com.google.inject.testing.fieldbinder.Bind;
import com.google.inject.testing.fieldbinder.BoundFieldModule;
import java.nio.charset.StandardCharsets;
import java.util.List;
import java.util.UUID;
import javax.inject.Inject;
@@ -72,7 +73,7 @@ public class DiscordStateTest
public void before()
{
Guice.createInjector(BoundFieldModule.of(this)).injectMembers(this);
when(partyService.getLocalPartyId()).thenReturn(UUID.nameUUIDFromBytes("test".getBytes()));
when(partyService.getLocalPartyId()).thenReturn(UUID.nameUUIDFromBytes("test".getBytes(StandardCharsets.UTF_8)));
}
@Test