From: Moritz Bunkus Date: Wed, 26 Aug 2009 09:42:54 +0000 (+0200) Subject: Nur dann die Eingabe recodieren, wenn sich die Charsets wirklich unterscheiden. X-Git-Tag: release-2.6.1beta1~319 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=999fdf7d5667498c2d7a60ae2906978388679000;p=kivitendo-erp.git Nur dann die Eingabe recodieren, wenn sich die Charsets wirklich unterscheiden. --- 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}; }