From 1358afe70142c6de8d0311d9c9293cee0d7c38d9 Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Thu, 23 Jul 2009 13:20:07 +0200 Subject: [PATCH] Installer break utf8 for DBD::mysql Signed-off-by: Galen Charlton Signed-off-by: Henri-Damien LAURENT --- C4/Installer.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/C4/Installer.pm b/C4/Installer.pm index caeb2ff87b..2e1fe1aaa0 100644 --- a/C4/Installer.pm +++ b/C4/Installer.pm @@ -79,6 +79,8 @@ sub new { $self->{'user'}, $self->{'password'}); $self->{'language'} = undef; $self->{'marcflavour'} = undef; + $self->{'dbh'}->do('set NAMES "utf8"'); + $self->{'dbh'}->{'mysql_enable_utf8'}=1; bless $self, $class; return $self; @@ -557,7 +559,7 @@ sub load_sql { . ( $self->{user} ? " -u $self->{user} " : "" ) . ( $self->{password} ? " -p'$self->{password}'" : "" ) . " $self->{dbname} "; - $error = qx($strcmd <$filename 2>&1 1>/dev/null); + $error = qx($strcmd --default-character-set=utf8 <$filename 2>&1 1>/dev/null); } elsif ( $self->{dbms} eq 'Pg' ) { $strcmd = "psql " . ( $self->{hostname} ? " -h $self->{hostname} " : "" ) -- 2.39.5