fixed: DataForm doesn't work properly with internationalized fields

fixed: incoming data not properly decoded from utf8
This commit is contained in:
Graham Knop 2008-08-22 21:23:40 +00:00
parent 2d3ca50c05
commit 3f4de3612f
3 changed files with 19 additions and 13 deletions

View file

@ -16,6 +16,7 @@ package WebGUI::Session::Form;
use strict qw(vars subs);
use WebGUI::HTML;
use Encode;
use base 'WebGUI::FormValidator';
=head1 NAME
@ -106,6 +107,9 @@ sub param {
if ($field) {
if ($self->session->request) {
my @data = $self->session->request->param($field);
foreach my $value (@data) {
$value = Encode::decode_utf8($value);
}
return wantarray ? @data : $data[0];
} else {
return undef;