From 08f0f8cba5b28db653ab1a5275ae4eb60e1ab1f2 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 --- 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