Commit 6b4aaae9 sunke

CSV导出乱码

1 个父辈 62b9883f
......@@ -2,6 +2,10 @@ package com.myproject.bean.excel;
import org.displaytag.export.CsvView;
import javax.servlet.jsp.JspException;
import java.io.IOException;
import java.io.Writer;
/**
* Created by sunke on 2019/2/26.
*/
......@@ -10,4 +14,10 @@ public class CNCsvView extends CsvView{
public String getMimeType() {
return "text/csv";
}
@Override
public void doExport(Writer out) throws IOException, JspException {
out.write(new String(new byte[] { (byte) 0xEF, (byte) 0xBB,(byte) 0xBF }));
super.doExport(out);
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!