待解决xagent导出csv中文显示乱码
//以下能正常显示英文,但中文就乱码//按网上说把charset=utf-8更改成DBK也不行,不知道为什么,哪个帮解决!ths!
// This XAgent just writes out the CSV data from the grid that is stored in a scope variable.
var exCon = facesContext.getExternalContext();
//var writer = facesContext.getResponseWriter();
var response = exCon.getResponse();
//response.setContentType("text/csv;charset=utf-8");
response.setContentType("text/csv;charset=utf-8");
//response.setCharacterEncoding("UTF-8");
var writer = facesContext.getResponseWriter();
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Content-Disposition", "attachment; filename=GridExport.csv");
writer.write(sessionScope.csvExport);
writer.endDocument();
补充:企业软件 , Lotus