X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/8d7674a0865360ccb0f2797ed558c05d20dc680a..9ac69514fec5d49a989f7489beaed480a42d217d:/SL/DBUpgrade2.pm diff --git a/SL/DBUpgrade2.pm b/SL/DBUpgrade2.pm index dfd5536b2..be7c54f5b 100644 --- a/SL/DBUpgrade2.pm +++ b/SL/DBUpgrade2.pm @@ -74,7 +74,7 @@ sub parse_dbupdate_controls { next if ($control->{ignore}); - $control->{charset} ||= Common::DEFAULT_CHARSET; + $control->{charset} = $control->{charset} || $control->{encoding} || Common::DEFAULT_CHARSET; if (!$control->{"tag"}) { _control_error($form, $file_name, $locale->text("Missing 'tag' field.")) ; @@ -136,7 +136,7 @@ sub process_query { my $file_charset = Common::DEFAULT_CHARSET; while (<$fh>) { last if !/^--/; - next if !/^--\s*\@charset:\s*(.+)/; + next if !/^--\s*\@(?:charset|encoding):\s*(.+)/; $file_charset = $1; last; } @@ -233,7 +233,7 @@ sub process_perl_script { } else { while (<$fh>) { last if !/^--/; - next if !/^--\s*\@charset:\s*(.+)/; + next if !/^--\s*\@(?:charset|encoding):\s*(.+)/; $file_charset = $1; last; } @@ -547,8 +547,10 @@ depends on. All other upgrades listed in C will be applied before the current one is applied. =item charset +=item encoding -The charset this file uses. Defaults to C if missing. +The charset this file uses. Defaults to C if +missing. Both terms are recognized. =item priority