Sign in to follow this  
pedroten

Spanish characters not displaying properly

Recommended Posts

Hello,

I'm using the latest licensed version of FusionCharts. I have an application in which I use the dataURL method trough JavaScript. The server-side (.NET) returns an xml file which specifies:

Response.ContentType = "text/xml";
Response.ContentEncoding = System.Text.Encoding.UTF8;
 

but when displaying the data, the special characters don't show up. This is an example of the dynamicly generated xml.

<?xml version="1.0" encoding="UTF-8"?>

<chart shownames="1" labelDisplay="STAGGER" caption="An

Share this post


Link to post
Share on other sites

hi,

You need not use ContentEncoding. What you need to do is to add BOM mark to the XML. You can alos try saving  the XML generator aspx file (not the cs)  as UTF-8 Encoded.

Otheswise, you need to the add the BOM just as the first 3 bytes of the XML.

Share this post


Link to post
Share on other sites

Thanks a lot, got it working using

 UTF8Encoding ue [color= rgb(0,0,0)]=[/color][color= rgb(0,0,0)] [/color][color= rgb(0,0,255)]new[/color][color= rgb(0,0,0)] UTF8Encoding([/color][color= rgb(0,0,255)]true[/color][color= rgb(0,0,0)], [/color][color= rgb(0,0,255)]true[/color][color= rgb(0,0,0)]);
 XmlTextWriter w [/color][color= rgb(0,0,0)]=[/color][color= rgb(0,0,0)] [/color][color= rgb(0,0,255)]new[/color][color= rgb(0,0,0)] XmlTextWriter(Response.OutputStream, ue);[/color]
[color= rgb(0,0,0)]//do things[/color]
[color= rgb(0,0,0)]w.Flush();[/color]
[color= rgb(0,0,0)] 

[/color]

-- Pedro

 

 

 

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