PDA

View Full Version : Charset bug


artosx
11-08-2011, 16:04
I have found that zabbix incorrectly sets up database connection charset. In file frontends/php/include/db.inc.php of zabbix-1.8.6 at lines 67-68:
DBexecute('SET NAMES utf8');
DBexecute('SET CHARACTER SET utf8');

First statement sets all charsets (client, results, connection) to utf 8, whereas second statement does almost the same, but sets connection character set to charset of whole database. On my opinion second statement is redundant and even harmful, since if one creates database with "wrong" character set, second statemant always forces to use this charset (but not utf8).

More info is here http://dev.mysql.com/... (http://dev.mysql.com/doc/refman/5.0/en/charset-connection.html)

Arturs Aboltins

Vedmak
12-08-2011, 16:46
Seems you are right, thanks you for reporting. New issue was created https://support.zabbix.com/browse/ZBX-4044