From adde35839be1b302547ec39bc330999dc3d55727 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 30 Sep 2023 19:35:50 +0100 Subject: cid#1545655 Dm: Dubious method used MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I76b447d51429c867e24c1bcdd357689c849ea103 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157438 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara --- .../com/sun/star/lib/connections/websocket/WebsocketConnection.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ridljar') diff --git a/ridljar/com/sun/star/lib/connections/websocket/WebsocketConnection.java b/ridljar/com/sun/star/lib/connections/websocket/WebsocketConnection.java index d408046b13ed..cdffa43faf6c 100644 --- a/ridljar/com/sun/star/lib/connections/websocket/WebsocketConnection.java +++ b/ridljar/com/sun/star/lib/connections/websocket/WebsocketConnection.java @@ -30,6 +30,7 @@ import java.net.ProtocolException; import java.net.Socket; import java.net.URI; import java.net.URISyntaxException; +import java.nio.charset.StandardCharsets; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Arrays; @@ -260,7 +261,7 @@ public class WebsocketConnection extends WebSocketClient implements XConnection, return; } - byte[] messageBytes = messageParts[1].getBytes(); + byte[] messageBytes = messageParts[1].getBytes(StandardCharsets.UTF_8); try { _inputStreamWriter.write(messageBytes); -- cgit