[Zope] Re: problem with input elements and unicode/utf-8
Daryl Daly
daryld at norco.com
Wed Feb 21 13:11:20 EST 2007
On Wed, February 21, 2007 2:05 am, Jostein Leira wrote:
>
> How about changing the following line 996 in
> /lib/python/zope/publisher/http.py ( as described in
> http://www.zope.org/Collectors/Zope/2280 )
>
> 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.
After making this change, Firefox behaviour does not change but I get a
UnicodeDecodeError in IE6. Here is the error_log entry:
Time 2007/02/21 10:05:31.895 US/Pacific
User Name (User Id) Anonymous User (None)
Request URL http://192.168.45.20:8080/test/test_form
Exception Type UnicodeDecodeError
Exception Value 'ascii' codec can't decode byte 0xc3 in position 16:
ordinal not in range(128)
Traceback (innermost last):
* Module ZPublisher.Publish, line 119, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 42, in call_object
* Module Shared.DC.Scripts.Bindings, line 313, in __call__
* Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
* Module Products.PageTemplates.ZopePageTemplate, line 331, in _exec
* Module Products.PageTemplates.ZopePageTemplate, line 427, in pt_render
* Module Products.PageTemplates.PageTemplate, line 89, in pt_render
* Module zope.pagetemplate.pagetemplate, line 117, in pt_render
* Module zope.tal.talinterpreter, line 271, in __call__
* Module zope.tal.talinterpreter, line 346, in interpret
* Module zope.tal.talinterpreter, line 408, in do_startTag
* Module zope.tal.talinterpreter, line 505, in attrAction_tal
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 16:
ordinal not in range(128)
Display traceback as text
REQUEST
form
-C ''
cookies
lazy items
SESSION <bound method SessionDataManager.getSessionData of
<SessionDataManager at /session_data_manager>>
other
TraversalRequestNameStack []
AUTHENTICATED_USER <SpecialUser 'Anonymous User'>
URL 'http://192.168.45.20:8080/test/test_form'
URL2 'http://192.168.45.20:8080'
SERVER_URL 'http://192.168.45.20:8080'
AUTHENTICATION_PATH ''
traverse_subpath []
BASE1 'http://192.168.45.20:8080'
BASE2 'http://192.168.45.20:8080/test'
BASE3 'http://192.168.45.20:8080/test/test_form'
PUBLISHED <ZopePageTemplate at /test/test_form>
URL1 'http://192.168.45.20:8080/test'
ACTUAL_URL 'http://192.168.45.20:8080/test/test_form'
URL0 http://192.168.45.20:8080/test/test_form
URL1 http://192.168.45.20:8080/test
URL2 http://192.168.45.20:8080
BASE0 http://192.168.45.20:8080
BASE1 http://192.168.45.20:8080
BASE2 http://192.168.45.20:8080/test
BASE3 http://192.168.45.20:8080/test/test_form
environ
HTTP_ACCEPT '*/*'
CONNECTION_TYPE 'Keep-Alive'
HTTP_USER_AGENT 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
.NET CLR 1.1.4322; .NET CLR 2.0.50727)'
SERVER_NAME '0.0.0.0'
GATEWAY_INTERFACE 'CGI/1.1'
SERVER_SOFTWARE 'Zope/(Zope 2.10.2-final, python 2.4.4, linux2) ZServer/1.1'
REMOTE_ADDR '192.168.45.151'
HTTP_ACCEPT_LANGUAGE 'en-us'
SCRIPT_NAME ''
REQUEST_METHOD 'GET'
HTTP_HOST '192.168.45.20:8080'
PATH_INFO '/test/test_form'
SERVER_PORT '8080'
SERVER_PROTOCOL 'HTTP/1.1'
channel.creation_time 1172081131
HTTP_ACCEPT_ENCODING 'gzip, deflate'
PATH_TRANSLATED '/test/test_form'
More information about the Zope
mailing list