diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 7fe070b5ae..5f548fd9b5 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,11 @@ +2011-04-04 Junichi Satoh + + * lib/PandoraFMS/Tools.pm: Added UTF-8 flags deletion from multibyte + characters when files are opened. + + * lib/PandoraFMS/DB.pm: Added mysql_enable_utf8. It enables character + semantics (support for multibyte characters). + 2011-03-16 Dario Rodriguez * util/plugin/create_integria_incident.sh: Fixed an error in help text. diff --git a/pandora_server/lib/PandoraFMS/DB.pm b/pandora_server/lib/PandoraFMS/DB.pm index 90ccfc22ff..f2f6ce1261 100644 --- a/pandora_server/lib/PandoraFMS/DB.pm +++ b/pandora_server/lib/PandoraFMS/DB.pm @@ -66,7 +66,7 @@ sub db_connect ($$$$$$) { if ($rdbms eq 'mysql') { # Connect to MySQL - my $dbh = DBI->connect("DBI:mysql:$db_name:$db_host:3306", $db_user, $db_pass, { RaiseError => 1, AutoCommit => 1 }); + my $dbh = DBI->connect("DBI:mysql:$db_name:$db_host:3306", $db_user, $db_pass, { RaiseError => 1, AutoCommit => 1, mysql_enable_utf8 => 1 }); return undef unless defined ($dbh); # Enable auto reconnect diff --git a/pandora_server/lib/PandoraFMS/Tools.pm b/pandora_server/lib/PandoraFMS/Tools.pm index 9abfba2a73..61f2c9adb4 100644 --- a/pandora_server/lib/PandoraFMS/Tools.pm +++ b/pandora_server/lib/PandoraFMS/Tools.pm @@ -30,6 +30,10 @@ use HTML::Entities; # Used to calculate the MD5 checksum of a string use constant MOD232 => 2**32; +# UTF-8 flags deletion from multibyte characters when files are opened. +use open OUT => ":utf8"; +use open ":std"; + require Exporter; our @ISA = ("Exporter");