From 671fbb683546ef8fce4145e081275c35b21e8cb5 Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Fri, 1 Jul 2016 15:44:55 +0200 Subject: [PATCH] Tell MySQL to return UTF-8 strings on win32. --- pandora_server/lib/PandoraFMS/DB.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandora_server/lib/PandoraFMS/DB.pm b/pandora_server/lib/PandoraFMS/DB.pm index 40363a2946..8630b3a24d 100755 --- a/pandora_server/lib/PandoraFMS/DB.pm +++ b/pandora_server/lib/PandoraFMS/DB.pm @@ -126,6 +126,9 @@ sub db_connect ($$$$$$) { # Enable character semantics $dbh->{'mysql_enable_utf8'} = 1; + # Tell the server to return UTF-8 strings. + $dbh->do("SET NAMES 'utf8';") if ($^O eq 'MSWin32'); + return $dbh; } elsif ($rdbms eq 'postgresql') {