]>
Commit | Line | Data |
---|---|---|
33f546fd WB |
1 | diff --git a/src/log_mysql.c b/src/log_mysql.c |
2 | index 2ce748a..f812a4d 100644 | |
3 | --- a/src/log_mysql.c | |
4 | +++ b/src/log_mysql.c | |
5 | @@ -226,6 +226,13 @@ static int pw_mysql_connect(MYSQL ** const id_sql_server) | |
6 | } | |
7 | server_down = 0; | |
8 | ||
9 | + if (mysql_set_character_set(*id_sql_server, "utf8")) | |
10 | + { | |
11 | + logfile(LOG_ERR, MSG_SQL_FAILED_CHSET_UTF8, | |
12 | + mysql_error(*id_sql_server), | |
13 | + mysql_character_set_name(*id_sql_server)); | |
14 | + } | |
15 | + | |
16 | return 0; | |
17 | } | |
18 | ||
19 | diff --git a/src/messages_en.h b/src/messages_en.h | |
20 | index 90999bb..201957a 100644 | |
21 | --- a/src/messages_en.h | |
22 | +++ b/src/messages_en.h | |
23 | @@ -200,6 +200,8 @@ | |
24 | #define MSG_UNKNOWN_ALTLOG "Unknown logging format" | |
25 | #define MSG_ACCOUNT_DISABLED "Can't login as [%s]: account disabled" | |
26 | #define MSG_SQL_WRONG_PARMS "Wrong SQL parameters" | |
27 | +#define MSG_SQL_FAILED_CHSET_UTF8 "Failed to set character set for database to utf8: %s \n" \ | |
28 | + "(using old character set: %s)" | |
29 | #define MSG_ILLEGAL_CONFIG_FILE_SQL "Invalid SQL configuration file" | |
30 | #define MSG_SQL_MISSING_SERVER "Missing server in the SQL configuration file" | |
31 | #define MSG_SQL_DOWN "The SQL server seems to be down" |