Table of Contents
How to use multi-lingual characters?
Before we talk about how exactly can you have multi-lingual characters in your charts, let’s briefly talk about the two ways in which FusionCharts takes its input XML data:- dataURL method: In this method, you provide the URL of XML Data Document to FusionCharts. This URL can be a physical XML document (like Data.xml) or relayed by a URL (like ReturnXMLData.asp). The chart now sends a request for XML data to the specified URL, reads it, parses it and then renders the charts accordingly. Click here for more details on this method.
- dataXML method: In this method, you send the XML data along with the HTML Content and chart SWF file to the browser. The SWF loads, reads this data (present in same page) and then renders the chart. Click here for more details on this method.
How to add BOM?
Adding the BOM stamp is a very simple process and can be done as follows depending on which method you are using:dataURL
In case you are using a static XML file, you can manually insert the BOM stamp to the XML data file following these 3 steps:- Open the file in question in a text-editor that supports UTF-8 encoding with BOM stamp (Example – Windows Notepad).
- Open the save menu and specify file name, file type, encoding and BOM mark (if the option is available).
- Save the file.
- Manually add BOM to the XML relayer script file – just like adding BOM stamp to the static XML files you can also add the BOM stamp to the server side file which would be relaying the dynamically generated XML. This needs to be done when the script file is created for the first time before you start coding in it.
- Write BOM using script – In most cases the XML relayer script file might be created with ANSI encoded format. In this case, one needs to add the BOM using script at the very beginning of the output stream. Moreover, when a server side script creates an XML file, it should add the BOM stamp as the very first 3 bytes of the file. As an example, you can append BOM for PHP script as under:
header ( 'Content-type: text/xml' ); echo pack ( 'C3 , 0xef, 0xbb, 0xbf' );To implement BOM stamp with other server-side technologies, please visit our online documentation on this here.