This page explains how the makumba web-app and the database layer should be configured in order to use the UTF-8 encoding.
Makumba.conf#
In the DataSource section of Makumba.conf set the encoding to UTF-8:encoding=utf8
Note: according to the code, this takes effect under the dataSource:name, not under dataSourceConfig!!!
Note: according to my (cristi) experience this doesn't work without setting this JVM argument:
-Dfile.encoding=UTF-8
See also
http://stackoverflow.com/questions/361975/setting-the-default-java-character-encoding
Also the whole database (not just tables) must be created with utf8 encoding, use alter database otherwise.
If you have other filters before makumba's, use a character encoding filter as exemplified here:
http://stackoverflow.com/questions/138948/how-to-get-utf-8-working-in-java-webapps
The filter must be used before any other filter. If a parameter is read before the request character encoding is set to utf8, the parameter encoding is compromised. For example CAS single-sign on breaks the encoding: https://issues.jasig.org/browse/CASC-122
Servlet container configuration#
In some cases you will need to configure your servlet container so as to use UTF-8 by default.In the case of Apache Tomcat, edit the conf/server.xml and add URIEncoding="UTF-8" and useBodyEncodingForURI="true" to the Connector definition. This is to pass UTF-8 through the URL-s so that no characters get missing.
<Connector URIEncoding="UTF-8" useBodyEncodingForURI="true" port="..." maxThreads="..." minSpareThreads="..." maxSpareThreads="..." enableLookups="..." redirectPort="..." acceptCount="..." connectionTimeout="..." disableUploadTimeout="..." /> %%
Database conversion#
If you want to convert a previous database to have access to the utf-8 character set,- do not forget to set all the binary fields in the db to binary so that no data is lost
- set the collation to utf-8 everywhere using this command for every table (for MYSQL, adapt according to your DB engine):
ALTER TABLE company_Employee_ SET CHARACTER SET utf8;