johsve339 Report post Posted January 26, 2009 Hi I try to create a chart with the character Share this post Link to post Share on other sites
Rahul Kumar Report post Posted January 28, 2009 Hi, Only using <?xml version="1.0" encoding="UTF-8"?> at the top of XML will not work, you would need to add BOM characters into your XML file. So you would need to tell us which language you are using, also please send us the code for the file that is generating XML. Share this post Link to post Share on other sites
johsve339 Report post Posted January 31, 2009 Hi What is BOM characters? I'm using swedish language. I'm using Java to render XML [b] package[/b] se.yit.tender.agent; [b] import[/b] java.io.PrintWriter; [b]import[/b] java.util.Map; [b]import[/b] lotus.domino.AgentBase; [b]import[/b] lotus.domino.AgentContext; [b]import[/b] lotus.domino.Database; [b]import[/b] lotus.domino.NotesException; [b]import[/b] lotus.domino.Session;[b] import[/b] se.procensor.domino.util.RequestParameter; [b]import[/b] se.yit.tender.chart.TenderStockChart; [b] public[/b] [b]class[/b] TenderStockChartAgent [b]extends[/b] AgentBase { [b] [/b] public [b]void[/b] NotesMain() { PrintWriter pw = getAgentOutput(); [b] [/b] [b] try[/b] { Session session = getSession(); AgentContext agentContext = session.getAgentContext(); Database db = agentContext.getCurrentDatabase(); TenderStockChart chart = [b]new[/b] TenderStockChart(session, db); Map parameters = RequestParameter.[i]parse[/i](agentContext, RequestParameter.[i]GET[/i]); String orgkey = (String)parameters.get("OrgKey"); int type = Integer.[i]parseInt[/i]((String)parameters.get("Type")); int chartType = Integer.[i]parseInt[/i]((String)parameters.get("ChartType")); String xml = chart.getXMLData(chartType, type, orgkey); pw.println("Content-Type: text/xml; charset=UTF-8"); pw.println("<?xml version="1.0" encoding="UTF-8"?>"); pw.println(xml); } [b]catch[/b] (NotesException e) { pw.println("NotesException: "+e.text); } [b]catch[/b] (Exception e) { pw.println("Exception: "+e.getMessage()); } } } Johan Share this post Link to post Share on other sites
Rahul Kumar Report post Posted February 2, 2009 Hi, Could you please try adding these new byte[]{(byte)0xEF, (byte)0xBB, (byte)0xBF} characters at the begning of your XML string? Share this post Link to post Share on other sites
johsve339 Report post Posted February 2, 2009 (edited) Hi Thanks, now it works. But really what is BOM characters... Johan Edited February 2, 2009 by Guest Share this post Link to post Share on other sites
Rahul Kumar Report post Posted February 2, 2009 Hi, Please see this for BOM character: http://en.wikipedia.org/wiki/Byte-order_mark Share this post Link to post Share on other sites