You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by ar...@apache.org on 2021/06/20 19:45:44 UTC

[incubator-nlpcraft] branch NLPCRAFT-343 updated: Fix for NLPCRAFT-343.

This is an automated email from the ASF dual-hosted git repository.

aradzinski pushed a commit to branch NLPCRAFT-343
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git


The following commit(s) were added to refs/heads/NLPCRAFT-343 by this push:
     new e493823  Fix for NLPCRAFT-343.
e493823 is described below

commit e49382309759c2db0edb8f4540a5700a9a13958e
Author: Aaron Radzinski <ar...@datalingvo.com>
AuthorDate: Sun Jun 20 12:45:35 2021 -0700

    Fix for NLPCRAFT-343.
---
 bin/nlpcraft.cmd                                                      | 2 ++
 bin/nlpcraft.sh                                                       | 2 ++
 .../main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala    | 4 ----
 .../scala/org/apache/nlpcraft/model/tools/cmdline/NCCliBase.scala     | 3 +++
 4 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/bin/nlpcraft.cmd b/bin/nlpcraft.cmd
index d312332..e15dc89 100644
--- a/bin/nlpcraft.cmd
+++ b/bin/nlpcraft.cmd
@@ -105,6 +105,8 @@ set JVM_OPTS= ^
     -server ^
     -XX:+UseG1GC ^
     -XX:MaxMetaspaceSize=256m ^
+    -Dsun.stdout.encoding=UTF-8 ^
+    -Dsun.stderr.encoding=UTF-8 ^
     -DNLPCRAFT_CLI= ^
     -DNLPCRAFT_CLI_CP="%CP%" ^
     -DNLPCRAFT_CLI_JAVA="%JAVA_HOME%\bin\java.exe" ^
diff --git a/bin/nlpcraft.sh b/bin/nlpcraft.sh
index dd647ed..bf5c5e0 100755
--- a/bin/nlpcraft.sh
+++ b/bin/nlpcraft.sh
@@ -178,6 +178,8 @@ JVM_OPTS="\
     -server \
     -XX:+UseG1GC \
     -XX:MaxMetaspaceSize=256m \
+    -Dsun.stdout.encoding=UTF-8 \
+    -Dsun.stderr.encoding=UTF-8 \
     -DNLPCRAFT_CLI= \
     -DNLPCRAFT_CLI_CP=$CP \
     -DNLPCRAFT_CLI_JAVA=$JAVA \
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
index 652c858..f21dd50 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
@@ -413,7 +413,6 @@ object NCCli extends NCCliBase {
         srvArgs ++= jvmOpts
 
         srvArgs += "-DNLPCRAFT_ANSI_COLOR_DISABLED=true" // No ANSI colors for text log output to the file.
-        srvArgs += "-Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2" // Fix for https://bugs.openjdk.java.net/browse/JDK-8213202
         srvArgs += "-cp"
         srvArgs += JAVA_CP
         srvArgs += "org.apache.nlpcraft.NCStart"
@@ -588,8 +587,6 @@ object NCCli extends NCCliBase {
 
         jvmArgs ++= jvmOpts
 
-        jvmArgs += "-Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2" // Fix for https://bugs.openjdk.java.net/browse/JDK-8213202
-
         if (cfgPath != null)
             jvmArgs += s"-DNLPCRAFT_PROBE_CONFIG=$cfgPath"
 
@@ -672,7 +669,6 @@ object NCCli extends NCCliBase {
         prbArgs ++= jvmOpts
 
         prbArgs += "-DNLPCRAFT_ANSI_COLOR_DISABLED=true" // No ANSI colors for text log output to the file.
-        prbArgs += "-Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2" // Fix for https://bugs.openjdk.java.net/browse/JDK-8213202
 
         if (mdls != null)
             prbArgs += "-Dconfig.override_with_env_vars=true"
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliBase.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliBase.scala
index 16f0f8b..9a19e3e 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliBase.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliBase.scala
@@ -38,6 +38,9 @@ class NCCliBase extends App {
      * Disable warnings from Ignite on JDK 11.
      */
     final val JVM_OPTS_RT_WARNS = Seq (
+        "-Dsun.stdout.encoding=UTF-8", // Fix for NLPCRAFT-343.
+        "-Dsun.stderr.encoding=UTF-8", // Fix for NLPCRAFT-343.
+        "-Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2", // Fix for https://bugs.openjdk.java.net/browse/JDK-8213202
         "--add-opens=java.base/jdk.internal.misc=ALL-UNNAMED",
         "--add-opens=java.base/sun.nio.ch=ALL-UNNAMED",
         "--add-opens=java.base/java.nio=ALL-UNNAMED",