primefaces p:dataExporter filename 支持中文 utf8

p:fileDownload and p:dataExporter :

 

 for p:fileDownload, the Content-Disposition header should be set like this:

externalContext.setResponseHeader("Content-Disposition", contentDispositionValue + ";filename=\"" + content.getName() + "\";filename*=UTF8''" + URLEncoder.encode(content.getName(), "UTF-8"));

 

p:dataExporter

filename=URLEncoder.encode("中文文件名", "UTF-8");

posted @ 2016-07-09 11:24  Bigben  阅读(604)  评论(0编辑  收藏  举报