To support utf8 in mysql, you will need to setup crowd on mysql (v 5.0.37 and JDBC connector mysql-connector-java-5.1.6) using the normal install method (what ever you choose in the interface setup wizard). Then once crowd is installed shutdown the crowd web application. Export the crowd database schema (with MySQLAdministrator.exe v1.2.12) that was created in mysql. Delete the crowd database schema from mysql and create the database with the mysql console run the query
DROP DATABASE crowd143;
CREATE DATABASE IF NOT EXISTS crowd143 CHARACTER SET utf8 DEFAULT COLLATE utf8_bin;
USE crowd143;
show variables;
make sure character_set_database is utf8 and collation_database is utf8_bin.
Note that you need to use the console to create the schema mysql administrator and other tools screw up the creating of character set, and collation for the schema.
Open you exported crowd schema, and change create table queries from
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
to end with
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
Save script, and import (using MySQLAdministrator.exe v1.2.12) the changed script back into the newly created crowd database schema in mysql.
Once this is done make sure your JDBC URL is something similar (must have autoReconnect=true&useUnicode=true&characterEn
coding=utf8)
jdbc:mysql://localhost/crowd143?autoReconnect=true&useUnicode=true&characterEn
coding=utf8
You can change the database URL in the crowd.cfg.xml (make sure you escape your & with &), or set it like this during the install.
In the crowd install you will want to add URIEncoding="UTF-8" attribute to the tomcat connector ($crowd_home$/apache-tomcat/conf/server.xml)
Once that above is done, start crowd and you now have UTF-8 on mysql.
The above work fine for Crowd 1.4.3 - standalone, with mysql 5.0.37.
Sorry forgot, you need to update the webwork xml so that it knows all requests and responses should be UTF-8
crowd-webapp/WEB-INF/classes/webwork.properties
webwork.i18n.encoding=UTF-8