Just wondering if anyone has seen this problem before, or has a general
solution to it. Basically what we see, is that with some submitted forms,
usually with 8 bit data, the POST parameters passed become 'doubled'. The
problem is that we have a loop like this to gather out all the parameters
early on in our handler code.

  foreach my $Key ($R->param) {
    my ($UKey, @UParam) = ($Key, $R->param($Key));

    $CGIState{$UKey} = scalar(@UParam) > 1 ? \@UParam : $UParam[0];
  }

The result is that we end up with an array reference for every parameter,
instead of a scalar value. And we can't just always take the first value,
because multi-select list boxes also return array values, and we don't know
at this stage in the code what type of form element each param comes from.

In general, the values are the same, except where there is 8 bit data, in
which case the 2 versions are different. Here's an example of what we see:

$VAR1 = {
   'LastScreen' => [
     '/MR-@0,324,',
     '/MR-@0,324,'
   ],
   'Subject' => [
     'Blah blah blah',
     'Blah blah blah'
   ],
   'Message' => [
     '‘blah blah’ blah blah ‘blah blah’ blah.',
     '<91>blah blah<92> blah blah <91>blah blah<92>blah.'
   ]
}

(The <91> etc are highlighted when using 'less', so I presume that probably
means it's hex code 0x91)

So it seems somewhere the 8 bit data is coming as both HTML entity versions,
and the raw 8 bit data version. I'm not sure if this is IE or mod_perl doing
this, though I'm guessing it's IE.

So in general, my questions are:
1. Have people seen this before, and how do you generally deal with it?
2. Actually how do you handle in general 8 bit data? How do you know which
charset it's coming as?
3. Is there any documentation anywhere on why this is happening? Who is
sending the two versions? How to detect it?

Any help or pointers on dealing with these issues would be appreciated.

Thanks

Rob

Reply via email to