From f2e7ed714d0fc34be23f6cc45a607b4e22c7eed4 Mon Sep 17 00:00:00 2001 From: FrostyHec <112929809+FrostyHec@users.noreply.github.com> Date: Thu, 17 Oct 2024 13:10:21 +0800 Subject: [PATCH] fix charset config and add check at init --- .../src/main/java/org/apache/hugegraph/HugeGraphHubble.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hugegraph-hubble/hubble-be/src/main/java/org/apache/hugegraph/HugeGraphHubble.java b/hugegraph-hubble/hubble-be/src/main/java/org/apache/hugegraph/HugeGraphHubble.java index 1c0019361..b4587d4c0 100644 --- a/hugegraph-hubble/hubble-be/src/main/java/org/apache/hugegraph/HugeGraphHubble.java +++ b/hugegraph-hubble/hubble-be/src/main/java/org/apache/hugegraph/HugeGraphHubble.java @@ -41,7 +41,8 @@ public static void main(String[] args) { } public static void initEnv() { - Ex.check(Charset.defaultCharset().equals(StandardCharsets.UTF_8),"Charset must be UTF-8"); + System.setProperty("file.encoding", "UTF-8"); + Ex.check(Charset.defaultCharset().equals(StandardCharsets.UTF_8),"Charset must be UTF-8, current:"+Charset.defaultCharset()); String hubbleHomePath = System.getProperty("hubble.home.path"); Ex.check(StringUtils.isNotEmpty(hubbleHomePath), "The system property 'hubble.home.path' must be set");