Explicitly use utf8 encoding for connection

This commit is contained in:
Ammar Askar
2013-05-19 20:27:52 +06:00
parent 596fdf054b
commit d448f90e2d

View File

@@ -129,7 +129,7 @@ public class Config
if (!config.contains(e.getKey())) if (!config.contains(e.getKey()))
config.set(e.getKey(), e.getValue()); config.set(e.getKey(), e.getValue());
logblock.saveConfig(); logblock.saveConfig();
url = "jdbc:mysql://" + config.getString("mysql.host") + ":" + config.getInt("mysql.port") + "/" + getStringIncludingInts(config, "mysql.database"); url = "jdbc:mysql://" + config.getString("mysql.host") + ":" + config.getInt("mysql.port") + "/" + getStringIncludingInts(config, "mysql.database") + "?useUnicode=true&characterEncoding=utf-8";
user = getStringIncludingInts(config, "mysql.user"); user = getStringIncludingInts(config, "mysql.user");
password = getStringIncludingInts(config, "mysql.password"); password = getStringIncludingInts(config, "mysql.password");
delayBetweenRuns = config.getInt("consumer.delayBetweenRuns", 2); delayBetweenRuns = config.getInt("consumer.delayBetweenRuns", 2);