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 5e25ed8c5..e0c208279 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 @@ -27,6 +27,9 @@ import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; import org.springframework.scheduling.annotation.EnableScheduling; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; + @SpringBootApplication @EnableScheduling @MapperScan("org.apache.hugegraph.mapper") @@ -38,6 +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, current:" + Charset.defaultCharset()); String hubbleHomePath = System.getProperty("hubble.home.path"); Ex.check(StringUtils.isNotEmpty(hubbleHomePath), "The system property 'hubble.home.path' must be set"); diff --git a/hugegraph-hubble/hubble-dist/assembly/static/bin/start-hubble.sh b/hugegraph-hubble/hubble-dist/assembly/static/bin/start-hubble.sh index 2626e0a5d..cecdb2435 100644 --- a/hugegraph-hubble/hubble-dist/assembly/static/bin/start-hubble.sh +++ b/hugegraph-hubble/hubble-dist/assembly/static/bin/start-hubble.sh @@ -42,7 +42,7 @@ for jar in "${LIB_PATH}"/*.jar; do class_path=${class_path}:${jar} done -JAVA_OPTS="-Xms512m" +JAVA_OPTS="-Xms512m -Dfile.encoding=UTF-8" JAVA_DEBUG_OPTS="" FOREGROUND="false"