[Koha-patches] [PATCH] Installer break utf8 for DBD::mysql
Henri-Damien LAURENT
henridamien.laurent at biblibre.com
Thu Jul 23 13:20:07 CEST 2009
---
C4/Installer.pm | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/C4/Installer.pm b/C4/Installer.pm
index caeb2ff..2e1fe1a 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} " : "" )
--
1.6.0.4
More information about the Koha-patches
mailing list