Eventually I found that the crash was due to an ISO-8859-1 character (a mac-style apostrophe) in a different field. Diacritics normally work fine in the app - on a successful submit, we save it to the database and always encode / decode it properly for AxKit. But when a form field failed to validate, PerForm was trying to spit the raw ISO-8859-1 character into the UTF-8 xml for the field value, which of course failed down the road.
My solution was to modify PerForm.pm, in the textfield and textarea methods:
...
# validate
if ($params->{"__submitting_$fname"}) {
new--> my $conv = Apache::AxKit::CharsetConv->new("ISO-8859-1", "utf-8");
new--> $params->{$name.$index} = $conv->convert(($params->get($name.$index))[-1]);
if (my $sub = $package->can($onval || "validate_${name}")) {
eval {
...
This works for me, converting any input into valid UTF-8 and avoiding crashes if there's a validation error. Does that make sense to be doing that here? Is it a bug in PerForm or am I missing something in my code? Seems like there's no other way to intercept those values and convert them to UTF-8... In either case, thought I'd throw it out there for more experienced PerForm gurus to take a look at.
Thanks, Nate
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]