Sign in to follow this  

multiligual characters and PHP generated XML

Recommended Posts

First of all HI,


And thank you to all developers who works hard on FusionChart product




my issue:


I'm using dataURL method to generate XML.




--XML generating file---




header('Content-type: text/xml; charset: utf-8');


echo $strXML;






All my non-English characters are wrong.




How can I fix this issue?


And how can I write BOM mark in PHP (add to $strXML variable).




I'm using PHP 5






Thank you.

Share this post

Link to post
Share on other sites


You can add non-english characters to your XML using PHP and let FusionCharts show them. For this you woudl need to add the BOM to the file.


If you are using dataURL method use these lines:

header('Content-type: text/xml');

echo pack("CCC",0xef,0xbb,0xbf); //adding BOM characters

echo strXML;

If you are using dataXML method you would need to save the PHP file with UTF-8 encoding with BOM. You can do this using Notepad or Drreamweaver etc.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this