How to write internationalized data to the database
2007-11-24If you use an internationalized version of QueueMetrics for a language based on a non-Latin
character set, you may find yourself unable to write strings in your own language (e.g. the name of
a queue) into QueueMetrics. This is usually not caused by QueueMetrics itself (that is completely
UTF-8 compliant) but by the underlying MySQL instance.
In order to make sure that your charset is accepted by your database:
In order to make sure that your charset is accepted by your database:
- Make sure that MySQL is installed in/for your language.
- Run the following commands on all tables of the database but the queue_log table:
ALTER TABLE `call_status` CHARACTER SET utf8;
ALTER TABLE `pause_codes` CHARACTER SET utf8;
....
This tells the database engine to accept UTF-8 on all storage tables. - Modify the connection string in web.xml so that it ends with:
....&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
This tells the MySQL connector to force UTF-8 encoding when talking to the datbase server.