# though.
$to->{$key} = $iconv->convert("" . $from->{$key});
} else {
- $to->{$key} = {} if 'HASH' eq ref $from->{$key};
- $to->{$key} = [] if 'ARRAY' eq ref $from->{$key};
+ $to->{$key} ||= {} if 'HASH' eq ref $from->{$key};
+ $to->{$key} ||= [] if 'ARRAY' eq ref $from->{$key};
_recode_recursively($iconv, $from->{$key}, $to->{$key});
}
}
# though.
$from->[$idx] = $iconv->convert("" . $from->[$idx]);
} else {
- $to->[$idx] = {} if 'HASH' eq ref $from->[$idx];
- $to->[$idx] = [] if 'ARRAY' eq ref $from->[$idx];
+ $to->[$idx] ||= {} if 'HASH' eq ref $from->[$idx];
+ $to->[$idx] ||= [] if 'ARRAY' eq ref $from->[$idx];
_recode_recursively($iconv, $from->[$idx], $to->[$idx]);
}
}
}
}
+ my $encoding = delete $temp_target->{INPUT_ENCODING} || $db_charset;
+
+ _recode_recursively(SL::Iconv->new($encoding, $db_charset), $temp_target => $target) if keys %$target;
+
if ($target->{RESTORE_FORM_FROM_SESSION_ID}) {
my %temp_form;
$::auth->restore_form_from_session(delete $target->{RESTORE_FORM_FROM_SESSION_ID}, form => \%temp_form);
_store_value($target, $_, $temp_form{$_}) for keys %temp_form;
}
- my $encoding = delete $temp_target->{INPUT_ENCODING} || $db_charset;
-
- _recode_recursively(SL::Iconv->new($encoding, $db_charset), $temp_target => $target) if keys %$target;
-
map { $target->{$_} = $temp_target->{$_} } keys %{ $temp_target };
$::lxdebug->leave_sub;