|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 1/10/2008 12:40:03 PM
Posts: 4,
Visits: 10
|
|
Hey ppl,
I just had an issue earlier with displaying non-English characters using httphandler and got it resolved in case you are interested.
Basically, I constructed the xml in the httphandler and i'm calling the httphandler from my javascript. The issue is for non-English characters, they became garbage. After some research, found out that we need this byte-order mark (BOM) in front of a manually constructed xml string. So in case you are doing something similar, make sure you do the following in your httphandler
String yourxml = graph-blah-graph;
Encoding Utf8 = new UTF8Encoding(true, true);
XmlTextWriter writer = new XmlTextWriter(context.Response.OutputStream, Utf8);
XmlDocument doc = new XmlDocument();
doc.LoadXml(yourxml);
doc.Save(writer);
writer.Close();
I had response encoding all setup to be utf-8 in web.config, such you would imagine that BOM will be automatically attached to the response, but it didn't. This is why you need the above code.
http://jumptree.com
|
|
|
|