Document oResult = m_serviceGateway.doRequest(oRequest);
httpServletResponse.getWriter().println("<?xml version='1.0' encoding='"+CoreConfigFactory.getEncoding()+"'?>");
httpServletResponse.getWriter().println(new String(oResult.getRootElement().asXML().getBytes("ISO8859-1"),"gb2312"));
//
DefaultDocument doc = new DefaultDocument();//DocumentHelper.createDocument();
doc.setXMLEncoding("GBK");
//String xml = doc.asXml();
String xml = xml.replaceFisrt("UTF-8","GB2312");
DefaultDocument doc = new DefaultDocument();
//DocumentHelper.createDocument();
doc.setXMLEncoding("gb2312");
多种解决方案
posted on 2006-12-01 11:48
一手的小窝窝 阅读(1056)
评论(0) 编辑 收藏 所属分类:
JAVA