maven-mvnd
maven-mvnd copied to clipboard
The CJK(Chinese/Japanese/Korean) characters in stderr are displayed as "?" after mvnd 1.0-m6-39 in Windows
Probably related issue: #883
Things like:
- Correct display:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project tfpay-notify-api: Compilation failure
[ERROR] /E:/workspace-test/maven-group/maven-cjk-char-display-error-demo/src/main/java/org/apache/maven/daemon/test/TestType.java:[17,66] 找不到符号
[ERROR] 符号: 类 TestParam123
[ERROR] 位置: 接口 org.apache.maven.daemon.test.TestType
- Wrong display:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project tfpay-notify-api: Compilation failure
[ERROR] /E:/workspace-test/maven-group/maven-cjk-char-display-error-demo/src/main/java/org/apache/maven/daemon/test/TestType.java:[17,66] ?????
[ERROR] ??: ? TestParam123
[ERROR] ??: ?? org.apache.maven.daemon.test.TestType
The command line tools seems dose not affect to this, I have test with CMD/PowerShell/Git Bash/Node.JS process API
. The output from Maven Daemon is just "?" and can not be decoded correctly anyway.
The wrong decoding result "?" usually comes from encode with UTF-8 -> decode with GBK -> encode with UTF-8 -> decode with GBK
.
At first I think the changes of Maven 4.0.0-alpha caused this, but then I test it with several different Mvn Daemon/JDK/Character Page
and finally found that it is only related to the version of Maven Daemon:
-
Maven Daemon 0.9.0 (Maven 3.8.7) + CHCP 936 (GBK) + JDK 1.8.0 : Correct
-
Maven Daemon 0.9.0 (Maven 3.8.7) + CHCP 936 (GBK) + JDK 19 : Correct
-
Maven Daemon 0.9.0 (Maven 3.8.7) + CHCP 65001 (UTF-8) + JDK 1.8.0 : Correct
-
Maven Daemon 0.9.0 (Maven 3.8.7) + CHCP 65001 (UTF-8) + JDK 19 : Correct
-
Maven Daemon 1.0.0-m4 (Maven 4.0.0-alpha-4) + CHCP 936 (GBK) + JDK 1.8.0 : Correct
-
Maven Daemon 1.0.0-m4 (Maven 4.0.0-alpha-4) + CHCP 936 (GBK) + JDK 19 : Correct
-
Maven Daemon 1.0.0-m4 (Maven 4.0.0-alpha-4) + CHCP 65001 (UTF-8) + JDK 1.8.0 : Correct
-
Maven Daemon 1.0.0-m4 (Maven 4.0.0-alpha-4) + CHCP 65001 (UTF-8) + JDK 19 : Correct
-
Maven Daemon 1.0-m6-39 (Maven 3.9.1) + CHCP 936 (GBK) + JDK 1.8.0 : Wrong
-
Maven Daemon 1.0-m6-39 (Maven 3.9.1) + CHCP 936 (GBK) + JDK 19 : Wrong
-
Maven Daemon 1.0-m6-39 (Maven 3.9.1) + CHCP 65001 (UTF-8) + JDK 1.8.0 : Wrong
-
Maven Daemon 1.0-m6-39 (Maven 3.9.1) + CHCP 65001 (UTF-8) + JDK 19 : Wrong
-
Maven Daemon 1.0-m6-40 (Maven 4.0.0-alpha-5) + CHCP 936 (GBK) + JDK 1.8.0 : Wrong
-
Maven Daemon 1.0-m6-40 (Maven 4.0.0-alpha-5) + CHCP 936 (GBK) + JDK 19 : Wrong
-
Maven Daemon 1.0-m6-40 (Maven 4.0.0-alpha-5) + CHCP 65001 (UTF-8) + JDK 1.8.0 : Wrong
-
Maven Daemon 1.0-m6-40 (Maven 4.0.0-alpha-5) + CHCP 65001 (UTF-8) + JDK 19 : Wrong
-
Maven Daemon 1.0-m7-39 (Maven 3.9.3) + CHCP 936 (GBK) + JDK 1.8.0 : Wrong
-
Maven Daemon 1.0-m7-39 (Maven 3.9.3) + CHCP 936 (GBK) + JDK 19 : Wrong
-
Maven Daemon 1.0-m7-39 (Maven 3.9.3) + CHCP 65001 (UTF-8) + JDK 1.8.0 : Wrong
-
Maven Daemon 1.0-m7-39 (Maven 3.9.3) + CHCP 65001 (UTF-8) + JDK 19 : Wrong
-
Maven Daemon 1.0-m7-40 (Maven 4.0.0-alpha-7) + CHCP 936 (GBK) + JDK 1.8.0 : Wrong
-
Maven Daemon 1.0-m7-40 (Maven 4.0.0-alpha-7) + CHCP 936 (GBK) + JDK 19 : Wrong
-
Maven Daemon 1.0-m7-40 (Maven 4.0.0-alpha-7) + CHCP 65001 (UTF-8) + JDK 1.8.0 : Wrong
-
Maven Daemon 1.0-m7-40 (Maven 4.0.0-alpha-7) + CHCP 65001 (UTF-8) + JDK 19 : Wrong
In fact I don't know how to stably print CJK characters in a english command-line environment, so I'm sorry I cannot provide a smallest demo to reproduce this issue, because those CJK characters are all from the compilation error message. But I'm pretty sure there was something changed from 1.0-m6
version to cause this issue.
have the same problem