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

How to change charset in .html?


Recommended Posts

By: acajax - liufenghuixue

How to change charset in .html?

2003-05-20 00:36

I want to change the charset="utf-8" to charset="gb2312",I mean to generate it derictly but not to change it in .html resource code.

Anyone can help me?

 

 

 

 

By: Teodor Danciu - teodord

RE: How to change charset in .html?

2003-05-20 02:35

 

Hi,

 

You have to use the JRHtmlExporter directly to export

the .jrprint file or a JasperReport object into HTML format.

This is beacuse when using the exporter class directly,

you have the possiblity to dynamically change some

portions of the generated HTML content.

 

There is the JRHtmlExporterParameter.HTML_HEADER

parameter that you can use to supply the HTML

content that you want to have at the beginning of the

resulting HTML document, instead of letting the engine

providing a default header with the default UTF-8 charset.

 

To see what is the default header you have to check

the source file for the JRHtmlExporter.

 

You can see how to directly use an exporter class if

you take a look at the samples, where XLS content

is generated in this manner.

 

I hope this helps.

Teodor

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

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