Solved the problem that cewolf is displayed as a box in Chinese in linux.

Source: Internet
Author: User
Solved the problem of cewolf displaying the box in Chinese in linux-Linux general technology-Linux technology and application information. The following is a detailed description. The server uses Ubuntu. In order to facilitate command line management, it sets a full English environment. Today, when I deployed the module that generated the graph to the server, I found that Chinese characters were displayed as boxes. I searched for a long time from google and did not come up with a reason. Some of the articles found are about encoding settings. I am not doing this. Because I am using UTF-8 code throughout the development process, there is no reason in my workstation display normal and not on the server. Later, I occasionally found an article about the deployment of Solaris, which may be the reason why jre cannot find the Chinese font. At first glance, I did not copy the Chinese font in the jre on the server, and the text cannot be displayed normally without it.

The simplest solution is to create a fallback folder in the $ JAVA_HOME/jre/lib/fonts directory and put the Chinese font in the folder, such as simsun. ttf.

Many JFreeChart programs developed on windows are deployed on linux servers and cannot correctly display Chinese characters. If all the codes are unified: for example, if UTF-8 is used, this problem may also occur when the Linux workstation is deployed to the server. Because the graphic interface is usually not installed when the server is installed, the Chinese language will not be considered too much, just as I forgot to install it.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.