From 78f0df906055d13bbbb9f84e900a7c82a67d0045 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 10 Feb 2010 14:07:17 +0100 Subject: [PATCH] Alle Eingaben konvertieren & UTF8-Flag setzen --- SL/Form.pm | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/SL/Form.pm b/SL/Form.pm index 29d293077..6ad6a9208 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -257,16 +257,10 @@ sub new { my $db_charset = $main::dbcharset; $db_charset ||= Common::DEFAULT_CHARSET; - if ($self->{INPUT_ENCODING}) { - if (lc $self->{INPUT_ENCODING} ne lc $db_charset) { - require Text::Iconv; - my $iconv = Text::Iconv->new($self->{INPUT_ENCODING}, $db_charset); + my $encoding = $self->{INPUT_ENCODING} || $db_charset; + delete $self->{INPUT_ENCODING}; - _recode_recursively($iconv, $self); - } - - delete $self->{INPUT_ENCODING}; - } + _recode_recursively(SL::Iconv->new($encoding, $db_charset), $self); $self->{action} = lc $self->{action}; $self->{action} =~ s/( |-|,|\#)/_/g; -- 2.20.1