httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Wheeler <da...@kineticode.com>
Subject Re: Apache::Request, APR::Table and UTF8
Date Thu, 07 Oct 2004 21:52:46 GMT
On Oct 7, 2004, at 1:31 PM, Boris Zentner wrote:

> This is not possible. The reason is that if you call decode for every 
> parameter, *ALL* parameters must be in utf8. That is not true.
> Also I can think of the DECODE_UTF8 flag from your example as a 
> utf8-flag-on-for-all parameters in the table. This is wrong for the 
> same reason as always off is wrong.

Well, I suppose that depends on how you write your application. 
Bricolage, for example, is written in such a way that it expects 
request parameters to all be in the same character set. So to decode 
them all would be simple (and very cool).

> My current solution is subclass Apache::Request copy all data to a CGI 
> like object with utf8 conversion, where needed. Then all other modules 
> act only on the CGI object with the correct utf8 flags and values. 
> This is far better than any hacks for all on or all off aproach.

Yes, it would be cool and proper to have Apache::Request do UTF-8 
conversion, which I think a subclass would easily be able to do.

> I understand, that APR::Table can not change it's current behavior. 
> But Apache::Request can and should. I'm really frightened that so much 
> emails and examples do not convert you all on how important correct 
> data for perl is.

I think that we're all in agreement that perl variable flags should be 
preserved where the underlying code is designed to handle Perl data 
(such as pnote()), not just character data (as with APR::Table).

> Again, no conversion just back what I put in that is the minimum 
> requirement for any data-store. There is no option, perl do it 
> automatic.

I think that this may not be possible given what you submit to the 
browser and get back from the browser is not Perl data (e.g., params). 
But pnotes(), for example, should do the right thing.

Regards,

David


Mime
View raw message