summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB/Mysql.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/DB/Mysql.pm')
-rw-r--r--Bugzilla/DB/Mysql.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm
index 25ee32b64..9e0d25277 100644
--- a/Bugzilla/DB/Mysql.pm
+++ b/Bugzilla/DB/Mysql.pm
@@ -58,8 +58,10 @@ sub new {
my $dsn = "DBI:mysql:host=$host;database=$dbname";
$dsn .= ";port=$port" if $port;
$dsn .= ";mysql_socket=$sock" if $sock;
+
+ my $attrs = { mysql_enable_utf8 => Bugzilla->params->{'utf8'} };
- my $self = $class->db_new($dsn, $user, $pass);
+ my $self = $class->db_new($dsn, $user, $pass, $attrs);
# This makes sure that if the tables are encoded as UTF-8, we
# return their data correctly.