From dcaf9754bac8b40319cbb62b6577fb2d2569aac7 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 17 Aug 2012 11:57:08 +0200 Subject: [PATCH] =?utf8?q?SQL-Upgrade:=20'@encoding'=20als=20Alias=20f?= =?utf8?q?=C3=BCr=20'@charset'=20erkennen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DBUpgrade2.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 -- 2.20.1