X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/93c6ec51f6bb239eb52c3e0b0d1adf87f57796ee..989b1fa36b14224d26b44e563989f6a8cc02b006:/SL/Form.pm diff --git a/SL/Form.pm b/SL/Form.pm index e0207243f..82f073ed7 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -203,7 +203,10 @@ sub _recode_recursively { if (any { ref $param eq $_ } qw(Form HASH)) { foreach my $key (keys %{ $param }) { if (!ref $param->{$key}) { - $param->{$key} = $iconv->convert($param->{$key}); + # Workaround for a bug: converting $param->{$key} directly + # leads to 'undef'. I don't know why. Converting a copy works, + # though. + $param->{$key} = $iconv->convert("" . $param->{$key}); } else { _recode_recursively($iconv, $param->{$key}); } @@ -212,7 +215,10 @@ sub _recode_recursively { } elsif (ref $param eq 'ARRAY') { foreach my $idx (0 .. scalar(@{ $param }) - 1) { if (!ref $param->[$idx]) { - $param->[$idx] = $iconv->convert($param->[$idx]); + # Workaround for a bug: converting $param->[$idx] directly + # leads to 'undef'. I don't know why. Converting a copy works, + # though. + $param->[$idx] = $iconv->convert("" . $param->[$idx]); } else { _recode_recursively($iconv, $param->[$idx]); }