Sign in to follow this  
lgaud

Multi-Lingual Support - Setdataxml

Recommended Posts

I am generating a chart which combines server side data with client side data. The client side data cannot be sent to the server, so I must use setDataXml. I was able to get my chart to display French accents properly using setDataUrl and setting the content type and binary writing the BOM as below.

 

Response.ContentType = "text/xml; characterset=utf-8";

Response.BinaryWrite(new byte[] { 0xEF, 0xBB, 0xBF });

 

However, I haven't been able to get this to display correctly using setDataXml, where the xml is constructed in JavaScript on the client. VisualStudio appears to be saving everything as UTF-8 with signature, and I have opened and saved the relevant files using Notepad and UTF-8. I have also tried setting the headers in Page_Load in the code behind.

 

 

protected void Page_Load(object sender, EventArgs e)

{

Response.ContentType = "text/html; characterset=utf-8";

//Response.HeaderEncoding = System.Text.Encoding.UTF8;

Response.BinaryWrite(new byte[] { 0xEF, 0xBB, 0xBF });

}

 

Any ideas? This is an older version of PowerCharts (we are considering upgrading for other reasons), but it does work with setDataUrl.

 

 

Share this post


Link to post
Share on other sites

Found a solution - encoding accents with character codes (e.g. & #233 ; for é) works. This should probably be noted in the documentation.

Edited by lgaud

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Thank you very much for your valuable feedback.

 

Glad to know that you have managed to resolve your problem.

 

Happy FusionCharting! biggrin.gif

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