If it comes to mysql server itself I’ve got following charset variables set:
character_set_client latin1
character_set_connection latin1
character_set_database latin1
character_set_filesystem binary
character_set_results latin1
character_set_server latin1
character_set_system utf8
character_sets_dir /usr/share/mysql/charsets/
collation_connection latin1_swedish_ci
collation_database latin1_swedish_ci
collation_server latin1_swedish_ci
I’ve discovered in Openfire documentation following note connected with this issue:
"MySQL does not have proper Unicode support, which makes supporting data in non-Western languages difficult. However, the MySQL JDBC driver has a workaround which can be enabled by adding ?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8 to the URL of the JDBC driver. You can edit the conf/openfire.xml file to add this value.
Note: If the mechanism you use to configure a JDBC URL is XML-based, you will need to use the XML character literal & to separate configuration parameters, as the ampersand is a reserved character for XML."
I’ve added this entry to my openfire.xml (replacing “&” with “&”) and changed character set in openfire’s db to utf-8 but I still have problems with Polish fonts when trying to add new user using openfire interface. For example, when I’m trying to add user with name “?o?”, openfire puts to jiveUsers.name “?o?” instead and from openfire everything looks just fine until restart of it. After restart, in openfire administration interface, I see his name as “?o?”. When I add this user from mysql, in openfire interface i can see his name as “£o¶”. Irritating, isin’t it? My current openfire.xml database section is following:
<database>
<defaultProvider>
<driver>com.mysql.jdbc.Driver</driver>
<serverURL>jdbc:mysql://localhost:3306/openfire?useUnicode=true&chara cterEncoding=UTF-8&characterSetResults=UTF-8</serverURL>
<username>openfire</username>
<password>XXX</password>
<minConnections>5</minConnections>
<maxConnections>5000</maxConnections>
<connectionTimeout>1.0</connectionTimeout>
</defaultProvider>
</database>