Chinese cannot be encoded correctly

0 votes
asked Sep 7, 2018 in Bug by tianmingxing (160 points)
cat a.txt



你ce -> Bob : 认证请求
Bob --> Alice: 认证请求响应

Alice -> Bob: 应用请求
Alice <-- Bob: 应用响应



java -jar plantuml.jar  -charset UTF-8 a.txt

After the above command is executed, the picture is indeed generated, but the Chinese characters are not displayed, only the English letters and numbers can be displayed.

I tried very hard to solve this problem, including reinstalling the JDK, but nothing.

java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)

   System Locale: LANG=zh_CN.utf8
       VC Keymap: cn
      X11 Layout: cn

1 Answer

0 votes
answered Sep 7, 2018 by tianmingxing (160 points)
I found the reason, did not install Asian fonts, after entering the following command, try to solve the problem.
yum groupinstall Fonts