Jump to content
Changes to the Jaspersoft community edition download ×

iReport Internationalization


disorder

Recommended Posts

Hi,

I made report in iReport with internationalization support for czech language.

I have problem with character encoding of properties file. I think that loaded parameters have another encoding as report.

Report encoding is set to UTF-8, all characters from database are correct, only from properties file not. Property file is in UTF-8 also.

Knows somebody, in which character encoding are loaded data from properties file?

Or has somebody the same problem?

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I am just in the process of internationalizing an application. My experience has been so far successful with the Java part which I plan to extend to the report part. The key was to learn that Java Properties class defaults to ISO-8859-1 encoding.

 

After using the load() method on the inputStream I took an Enumeration of the keys and used the next two lines to do the work:

 

byte[] valueInBytes = prop.getProperty( key ). getBytes("ISO-8859-1");

 

prop.setProperty( key, new String( valueInBytes, "UTF-8"));

 

I plan to try the same method on the properties loaded in the JRDataSource. I wish I could tell you that I already did this but it is worth a shot. One thing I am sure of is that the Properties load() method defaults to ISO-8859-1.

Link to comment
Share on other sites

I am just in the process of internationalizing an application. My experience has been so far successful with the Java part which I plan to extend to the report part. The key was to learn that Java Properties class defaults to ISO-8859-1 encoding.

 

After using the load() method on the inputStream I took an Enumeration of the keys and used the next two lines to do the work:

 

byte[] valueInBytes = prop.getProperty( key ). getBytes("ISO-8859-1");

 

prop.setProperty( key, new String( valueInBytes, "UTF-8"));

 

I plan to try the same method on the properties loaded in the JRDataSource. I wish I could tell you that I already did this but it is worth a shot. One thing I am sure of is that the Properties load() method defaults to ISO-8859-1.

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