From: Moritz Bunkus Date: Wed, 30 Jan 2013 17:52:58 +0000 (+0100) Subject: scripts/dbupgrade2_tool.pl: UTF-8-encodierte Upgradescripte richtig behandeln X-Git-Tag: release-3.1.0beta1~661 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=9569aa4b1211dbc40667a2999dd7b87304f8bd32;p=kivitendo-erp.git scripts/dbupgrade2_tool.pl: UTF-8-encodierte Upgradescripte richtig behandeln --- diff --git a/scripts/dbupgrade2_tool.pl b/scripts/dbupgrade2_tool.pl index 3ed2186e8..50cd27b9b 100755 --- a/scripts/dbupgrade2_tool.pl +++ b/scripts/dbupgrade2_tool.pl @@ -331,6 +331,9 @@ sub apply_upgrade { exit 0; } + my $db_charset = $::lx_office_conf{system}->{dbcharset}; + $db_charset ||= Common::DEFAULT_CHARSET(); + foreach my $control (@upgradescripts) { $control->{file} =~ /\.(sql|pl)$/; my $file_type = $1; @@ -339,9 +342,9 @@ sub apply_upgrade { print "Applying upgrade $control->{file}\n"; if ($file_type eq "sql") { - $dbupgrader->process_query($dbh, "sql/$form->{dbdriver}-upgrade2/$control->{file}", $control); + $dbupgrader->process_query($dbh, "sql/$form->{dbdriver}-upgrade2/$control->{file}", $control, $db_charset); } else { - $dbupgrader->process_perl_script($dbh, "sql/$form->{dbdriver}-upgrade2/$control->{file}", $control); + $dbupgrader->process_perl_script($dbh, "sql/$form->{dbdriver}-upgrade2/$control->{file}", $control, $db_charset); } }