[Zope] Re: problem with input elements and unicode/utf-8

Dieter Maurer dieter at handshake.de
Wed Feb 21 15:47:41 EST 2007


Jostein Leira wrote at 2007-2-21 02:05 -0800:
> ...
>      header_present = 'HTTP_ACCEPT_CHARSET' in self.request 
>  to 
>   
>      header_present = 'HTTP_ACCEPT_CHARSET' in self.request.keys() 
>  
>I think this is a bug. After doing that change, IE6 and IE7 behaved consistently.

"HTTPRequest.keys" is a very costly method.

In the case, that "in" has a bug (and does not work reliably),
then "self.request.has_key('HTTP_ACCEPT_CHARSET')" should
be used (even better would be to implement "in" by calling "has_key").



-- 
Dieter


More information about the Zope mailing list