Chinese cannot be encoded correctly

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

```

@startuml

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

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

@enduml

```

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

+1 vote
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
http://help.accusoft.com/PrizmDoc/v12.2/HTML/Installing_Asian_Fonts_on_Red_Hat_and_CentOS.html
commented May 12, 2021 by arayzou (100 points)
works for me,Thanks!
...