From 55ca5c7087a750ae10c3328a2e32cd2740e6c0f6 Mon Sep 17 00:00:00 2001 From: RaphiMC <50594595+RaphiMC@users.noreply.github.com> Date: Thu, 13 Apr 2023 16:32:56 +0200 Subject: [PATCH] Use UTF-8 charset for string -> bytes conversion --- .../raphimc/viaproxy/saves/impl/accounts/OfflineAccount.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/raphimc/viaproxy/saves/impl/accounts/OfflineAccount.java b/src/main/java/net/raphimc/viaproxy/saves/impl/accounts/OfflineAccount.java index fd533d4..900e240 100644 --- a/src/main/java/net/raphimc/viaproxy/saves/impl/accounts/OfflineAccount.java +++ b/src/main/java/net/raphimc/viaproxy/saves/impl/accounts/OfflineAccount.java @@ -20,6 +20,7 @@ package net.raphimc.viaproxy.saves.impl.accounts; import com.google.gson.JsonObject; import org.apache.http.impl.client.CloseableHttpClient; +import java.nio.charset.StandardCharsets; import java.util.UUID; public class OfflineAccount extends Account { @@ -34,7 +35,7 @@ public class OfflineAccount extends Account { public OfflineAccount(final String name) { this.name = name; - this.uuid = UUID.nameUUIDFromBytes(("OfflinePlayer:" + name).getBytes()); + this.uuid = UUID.nameUUIDFromBytes(("OfflinePlayer:" + name).getBytes(StandardCharsets.UTF_8)); } @Override