Changing Character Encoding¶
Depending on the third-party software used and supported locales, you may also have to configure JasperReports Server and its host.
The steps described in this section are necessary only under certain circumstances, such as if you plan to use a character encoding form that UTF-8 cannot handle.
To use a character encoding form other than UTF-8, you must configure JasperReports Server, your application server, and your database server.
Configuring JasperReports Server¶
To specify a different character encoding
-
Open the
.../WEB-INF/applicationContext.xmlfile and locate the following bean. It is configured for UTF-8: -
Change
"UTF-8"to the encoding type your database server and application server use. For example: -
Save the file.
-
Restart JasperReports Server.
Configuring the Application Server and Database Server¶
If you want to use a character encoding other than UTF-8, you may need to configure the third-party software that JasperReports Server relies on. For more information, refer to the documentation for your application server and database server. For Tomcat, you can specify a different character encoding by following steps similar to those described in Tomcat and UTF-8 Configuration.
Configuration for Localized Analysis Schemas¶
If you plan to use localized OLAP views, you must take additional steps to configure JasperReports Server.
To configure JasperReports Server for localized OLAP views
-
Every Unicode database that JasperReports Server interacts with (whether it is the repository database or a database accessed through a data source defined in JasperReports Server) must be created to support UTF-8. For example, to create the Foodmart database in PostgreSQL, you might give a command similar to the following:
-
The URL of any OLAP data source that JasperReports Server accesses must be properly configured in the
.../META-INF/context.xmlfile. For example, the URL definition for the Foodmart sample database might be similar to the following: -
Encoding options must be added to the JDBC connection string for any data source that points to an OLAP database. For example, when creating a data source in JasperReports Server that points to an OLAP database, use the following connection string: