Skip to content

Commit ad9e134

Browse files
uvjustindevgianlu
andauthored
Minor change to keep UTF-8 encoding (#183)
* Maintain UTF-8 encoding Co-authored-by: Gianlu <[email protected]>
1 parent da8c938 commit ad9e134

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • core/src/main/java/xyz/gianlu/librespot/player

core/src/main/java/xyz/gianlu/librespot/player/Player.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ private void send(@NotNull String type, @NotNull String code, @Nullable byte[] p
766766

767767
if (payload != null) {
768768
out.write(String.format("<item><type>%s</type><code>%s</code><length>%d</length>\n<data encoding=\"base64\">%s</data></item>\n", type, code,
769-
payload.length, Base64.getEncoder().encodeToString(payload)).getBytes(StandardCharsets.UTF_8));
769+
payload.length, new String(Base64.getEncoder().encode(payload),StandardCharsets.UTF_8)).getBytes(StandardCharsets.UTF_8));
770770
} else {
771771
out.write(String.format("<item><type>%s</type><code>%s</code><length>0</length></item>\n", type, code).getBytes(StandardCharsets.UTF_8));
772772
}

0 commit comments

Comments
 (0)