Stevan,

Well once we have a proper "use", we should be able to set the encoding at compile time. But until then, I see a few possible options:

I think, it would be nice to find another solution.

- setting the url encoding forces a re-encoding of any parameters already encoded.

This means extra work if you change the encoding, but it will only happen once.

It can't work (or with a big overhead), because POST parameters coming from the STDIN, and it's just readable once. If you would like to do it, then you have to store the whole input, which can be large.


- moving the decoding process to be "on demand" when fetching the params

This would slow do the param() function, but would mean you only decoded exactly what you needed and nothing more.

It sounds good, and I have another idea. What, if the first param() function call would trigger the whole paramter decoding? It's not an overhead, because you have to do the process if you would like to get a parameter, but an improvement, because if you don't want to query a parameter (you just include the CGI.pm just for to print header(), etc.), then there won't be processing + decoding.


Bye,
  Andras

Reply via email to