From 999fdf7d5667498c2d7a60ae2906978388679000 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 26 Aug 2009 11:42:54 +0200 Subject: [PATCH] Nur dann die Eingabe recodieren, wenn sich die Charsets wirklich unterscheiden. --- SL/Form.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/SL/Form.pm b/SL/Form.pm index 4febdc72a..64bed8651 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -306,11 +306,13 @@ sub new { my $db_charset = $main::dbcharset; $db_charset ||= Common::DEFAULT_CHARSET; - if ($self->{INPUT_ENCODING} && (lc $self->{INPUT_ENCODING} ne $db_charset)) { - require Text::Iconv; - my $iconv = Text::Iconv->new($self->{INPUT_ENCODING}, $db_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); - _recode_recursively($iconv, $self); + _recode_recursively($iconv, $self); + } delete $self{INPUT_ENCODING}; } -- 2.20.1