Bernie6421 Report post Posted January 27, 2015 (edited) Hi, I use Fusion charts 3.1, I have the problem, that the chinese characters are not displayed correctly: See the first chart here: http://www.factfish.org/zh/tonjiguo/%E5%BE%B7%E5%9B%BD/%E4%BA%BA%E5%9D%87%E8%83%BD%E6%BA%90%E6%B6%88%E8%80%97 What's strange is that the second chart on the Page (the Pie chart) displays the characters correctly. The XML of the chart seems OK: All charcters are encoded as XML entities: <chart caption='人均能源消耗 (千克油当量)' ... You can take a look at the XML here: http://www.factfish.org/statistics/drill_down_line_chart.php?data_set=105&location=47〈=zh In the PHP the Chart is created like this: $xml_string = $doc->saveXML(); header('Content-Type: text/html; charset=utf-8'); $xml_string=str_replace('"',"'",$xml_string); echo trim(preg_replace('/<\?xml.*\?>/', '', $xml_string, 1)); Any ideas? Thank you Bernhard Edited January 27, 2015 by Bernie6421 Share this post Link to post Share on other sites
Vishalika Report post Posted January 28, 2015 (edited) Hi, To use multi-lingual characters on the chart, you need to use UTF-8 encoded XML with a BOM stamp within the first 3 bytes of the XML file. Refer this link for reference: http://docs.fusioncharts.com/tutorial-how-to-guides-using-special-characters-in-a-chart.html Hope this helps. Edited January 28, 2015 by Vishalika Share this post Link to post Share on other sites
Bernie6421 Report post Posted January 29, 2015 Hi Vishalika, thank you very much for your response, I tried to add the BOM at the beginning of the file but it's still not working. In my case I don't use the UTF8 characters directly as caption but the XML entities, so it should work also without UTF8 encoding (?). Do you have another idea? Thanks Bernhard Share this post Link to post Share on other sites
Vishalika Report post Posted January 29, 2015 Hi, Can you please specify how you are adding the BOM stamp? Also, you necessarily need to use UTF-8 encoded XML for displaying multi-lingual characters in caption. If possible, send a scaled down sample so that we can help you out further? Awaiting response. Share this post Link to post Share on other sites
Bernie6421 Report post Posted January 29, 2015 (edited) Thank you for your answer, I used this code for adding the BOM stamp header ( 'Content-type: text/xml; charset=utf-8' ); echo pack ( "C3" , 0xef, 0xbb, 0xbf ); Here is a narrowed version of the chart: <chart caption='人均能源消耗 (千克油当量)'> <categories> <category label='1960'/> <category label='1961'/> </categories> <dataset seriesName='德国'> <set value='1952.53390446186' toolText='1960: 1.953'/> <set value='1994.3205580687' toolText='1961: 1.994'/> </dataset> </chart> Hope that can help you to track the problem, Thanks Bernhard Edited January 29, 2015 by Bernie6421 Share this post Link to post Share on other sites
Vishalika Report post Posted January 30, 2015 Hi, Try replacing the caption characters with the main Chinese language characters. Since from our end no issue has been replicated. Share this post Link to post Share on other sites