The problem of garbled characters of Birt chart in Linux

Source: Internet
Author: User

Birtchart Linux in the Chinese garbled problem is that the Java Virtual machine can not find the Chinese font file caused by fonts.

Steps:

1. Export lang=zh_cn in. Bash_profile. GB2312 modified to:

Export lang=zh_cn.gb18030. Because GB2312 does not support some special characters.

2. Modify the font in the generated chart's XML Source: Change the Sansserif to SimSun.

3. Find a Chinese font that can be used under Linux, which can be C:\WINDOWS\FONTS\SIMSUN.TTC under Windows 7.

4, in this to use the root user "root/rootgnnt" login, put the above fonts in the Linux Server installation JDK directory under the/opt/jdk1.8.0_91/jre/lib/fonts directory.

5, modify the/opt/jdk1.8.0_91/jre/lib/fonts/fonts.dir

5.1, the first line of the number plus one (if 48 is changed to 49).

5.2. Add in the last line:

Simsun.ttc-sungtil gb-medium-r-normal--0-0-0-0-c-0-gb2312.1988-0

6. Modify the/opt/jdk1.8.0_91/jre/lib/fontconfig.properties.src file

Change the line containing iso8859-1 from the equal sign to the following:

-sungtil gb-medium-r-normal--0-0-0-0-c-0-gb2312.1988-0

Contains "Chartobyteiso8859_1" can not change).

7. Start the Web server


Before the modification, garbled as:

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/84/1C/wKiom1eF4JGRauraAAAlR91wYuI171.png-wh_500x0-wm_3 -wmp_4-s_3312468920.png "title=" 20160713143255.png "alt=" Wkiom1ef4jgrauraaaalr91wyui171.png-wh_50 "/>

After modification, as normal as:

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/84/1D/wKiom1eF4N-QxzuQAAB_akXzgS8149.png-wh_500x0-wm_3 -wmp_4-s_1314129827.png "title=" 20160713143419.png "alt=" Wkiom1ef4n-qxzuqaab_akxzgs8149.png-wh_50 "/>

The problem of garbled characters of Birt chart in Linux

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.