Solution to Chinese garbled characters in JFreeChart in Linux
Source: Internet
Author: User
Solution to Chinese garbled characters in JFreeChart in Linux-general Linux technology-Linux programming and kernel information. For details, see below. Cause: first, the garbled problem between JFreeChart and the Chinese verification code is irrelevant to the jsp code. It is caused by the failure to find the font file on the Java VM. Therefore, the Chinese garbled problem of Swing or AWT of the same type is also applicable.
Environment:
JDK (the JDK version is very important. If it is 1.4.2, the font configuration file under the JRE directory is not the same)
RedHat4.0
Tomcat5.0
Solution:
1. Confirm that zysong. ttf exists in the % JavaHome %/jre/lib/fonts directory.
2. Run the "ttmkfdir-o fonts. dir" command in the % JavaHome %/jre/lib/fonts directory to regenerate the fonts. dir file.
3. confirm that the/usr/share/fonts/zh_CN/TrueType directory exists. If not, mkdir is created.
4. Confirm that zysong. ttf exists in the/usr/share/fonts/zh_CN/TrueType directory.
5. In the % JavaHome %/jre/lib directory, run cp fontconfig. RedHat.3.properties. src fontconfig. properties
6. Restart tomcat!
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