gpt4 book ai didi

java - 字符编码 JasperReports 5.6.0

转载 作者:搜寻专家 更新时间:2023-11-01 03:37:42 26 4
gpt4 key购买 nike

导出报告前如何设置字符编码?

5.6.0之前的版本

exporter.setParameter(JRExporterParameter.CHARACTER_ENCODING, "ISO-8859-1");

新版本,我该如何设置?

最佳答案

嗯,在没有收到回复后,终于找到了答案:

ExporterOutput reportOutput;
reportOutput = new SimpleHtmlExporterOutput(reportFile,"ISO-8859-1");

其中 reportFile 是我的新文件的 url 字符串,编码只是作为构造函数的第二个参数。这仅适用于 HTML 导出。

关于java - 字符编码 JasperReports 5.6.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25628295/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com