Jump to content
Changes to the Jaspersoft community edition download ×

Japanese Character issue with JRHtmlExporter


parthbhagat

Recommended Posts

I am using Jasper Report API 4.5. I am trying to export reports in HTML and PDF format. The application I am using Jasper Report in is having i18n support with Japanese language.

To export report in PDF format JRPdfExporter class is used. With this exporter generated PDF file works fine. Displays Japanese character properly. But when the same report with same data exported in HTML format the Japanese characters looks like '????'. I am displaying HTML report in web application and exporter class used to export in HTML format is JRHtmlExporter.

With HTML exporter I have set paramter JRHtmlExporterParameter.HTML_HEADER as below text:

   

 

I have set HTML exporter's parameter JRExporterParameter.FONT_MAP as:

   Map FONT_MAP = new HashMap();   FONT_MAP.put("sansserif", "Arial, Verdana, Tahoma");   FONT_MAP.put("serif", "Times New Roman");   FONT_MAP.put("monospaced", "Courier, Courier New");,>,>

Any guess where it is going wrong? Have I missed something in export functionality?

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

JRXML file has character encoding as:

<?xml version="1.0" encoding="UTF-8"?>

 

Specified content type of HTML header as UTF-8/

 

Where else I need to set character encoding? For Japanese character do we require to have Font name specified in FONT_MAP parameter mentioned in the question?

Link to comment
Share on other sites

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...