Jump to content
We've recently updated our Privacy Statement, available here ×

Pb of UTF-8 encoding with CSV exporter


cavenas

Recommended Posts

Hello,

 

I have a problem with UTF-8 encoding with CSV exporter in a TOMCAT / Servlet environment.

All is fine with other exporters (PDF, HTML, XLS), but I still haven't found a solution with CSV exporter.

 

Here's the piece of code what I'm using in my servlet:

PrintWriter printWriter = response.getWriter() ;

JRCsvExporter exporter = new JRCsvExporter();

exporter.setParameter(JRCsvExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRCsvExporterParameter.OUTPUT_WRITER, printWriter);

exporter.setParameter(JRCsvExporterParameter.FIELD_DELIMITER, ";"); exporter.setParameter(JRCsvExporterParameter.CHARACTER_ENCODING, "UTF-8");

exporter.exportReport();

 

The browser result is a suite of question marks (????...) instead of unicode caracters (arial.ttf font). :(

 

I'm using japserreports 1.3.0 and TOMCAT 5.5.20 with JDK 1.5 on Linux/Windows plateforms.

 

There are another forum threads on this issue but answers are not complete.

 

Thanks for any help.

 

cav

Link to comment
Share on other sites

  • 3 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...