About how to export highcharts Chinese,

Source: Internet
Author: User

About how to export highcharts Chinese,

In a previous project, highcharts was used to display data. By default, highcharts's own export service was used. Later, the customer said that the server over there could not access the internet, there is no way to implement the report export service on your own, so the code for the export service will not be pasted, and there will be a lot of searching on the Internet. The following describes a problem: Chinese garbled characters during export!

Garbled

The Chinese title of the report is changed to a box. At first, we thought it was caused by inconsistency between the front and back encoding. We checked the front and back and found that all the encoding methods are UTF-8, which indicates that the encoding is correct. Later, the svg data sent in the previous section was copied to the export service and written to death. The war package was put under the Local tomcat (windows system) and the interface was called directly to find that the exported image was normal. Then, place the war package on the server (Linux system) and call the interface to export the above image. In this way, the servers on both sides are different. The problem was finally found to be about Chinese support. I found a Chinese font and put it in the/usr/share/fonts/directory. I restarted the service and called the export interface.


The image is normal.

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.