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

2007-02-21 Thread Dieter Maurer
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

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

2007-02-21 Thread Andreas Jung
--On 21. Februar 2007 21:27:38 +0100 Dieter Maurer <[EMAIL PROTECTED]> wrote: Andreas Jung wrote at 2007-2-20 17:52 +0100: ... I can reproduce this error. Obviously RestrictedPython.compile_restricted_eval() can't deal correctly with unicode strings. Newer Python versions need to know the

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

2007-02-21 Thread Dieter Maurer
Andreas Jung wrote at 2007-2-20 17:52 +0100: > ... >I can reproduce this error. Obviously >RestrictedPython.compile_restricted_eval() can't deal correctly with >unicode strings. Newer Python versions need to know the encoding of the source. In standard Python scripts, a coding comment in the for

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

2007-02-21 Thread Jostein Leira
Andreas Jung <[EMAIL PROTECTED]> wrote: --On 21. Februar 2007 11:30:11 +0100 Andreas Jung wrote: > --On 21. Februar 2007 02:05:36 -0800 Jostein Leira > wrote: >> header_present = 'HTTP_ACCEPT_CHARSET' in self.request >> to >> >> header_present = 'HTTP_ACCEPT_CHARSET' in self.request.keys() >> >

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

2007-02-21 Thread Daryl Daly
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_pr

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

2007-02-21 Thread Andreas Jung
--On 21. Februar 2007 11:30:11 +0100 Andreas Jung <[EMAIL PROTECTED]> wrote: --On 21. Februar 2007 02:05:36 -0800 Jostein Leira <[EMAIL PROTECTED]> wrote: header_present = 'HTTP_ACCEPT_CHARSET' in self.request to header_present = 'HTTP_ACCEPT_CHARSET' in self.request.keys()

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

2007-02-21 Thread Andreas Jung
--On 21. Februar 2007 02:05:36 -0800 Jostein Leira <[EMAIL PROTECTED]> wrote: header_present = 'HTTP_ACCEPT_CHARSET' in self.request to header_present = 'HTTP_ACCEPT_CHARSET' in self.request.keys() I assume that the request implementation of Zope 3 and Zope 2 differ a bit when

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

2007-02-21 Thread Jostein Leira
--- In [EMAIL PROTECTED], "Daryl Daly" <[EMAIL PROTECTED]> wrote: > > > I have setup a test case which seems to show the problem. This test > removes the database component. > > New install of zope 2.10.2: > Zope Version (Zope 2.10.2-final, python 2.4.4, linux2) > Python Version 2.4.4 (#1, Oct 23

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

2007-02-20 Thread jleira
>--- In [EMAIL PROTECTED], Andreas Jung <[EMAIL PROTECTED]> wrote: >--On 20. Februar 2007 18:52:51 +0100 Andreas Jung <[EMAIL PROTECTED]> wrote: >> --On 20. Februar 2007 17:52:52 +0100 Andreas Jung <[EMAIL PROTECTED]> wrote: >>> --On 19. Februar 2007 12:29:34 -0800 Jostein Leira <[EMAIL PROTECTED]>

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

2007-02-20 Thread Andreas Jung
--On 20. Februar 2007 18:52:51 +0100 Andreas Jung <[EMAIL PROTECTED]> wrote: --On 20. Februar 2007 17:52:52 +0100 Andreas Jung <[EMAIL PROTECTED]> wrote: --On 19. Februar 2007 12:29:34 -0800 Jostein Leira <[EMAIL PROTECTED]> wrote: If it contains either of the tal-lines below I get

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

2007-02-20 Thread Andreas Jung
--On 20. Februar 2007 17:52:52 +0100 Andreas Jung <[EMAIL PROTECTED]> wrote: --On 19. Februar 2007 12:29:34 -0800 Jostein Leira <[EMAIL PROTECTED]> wrote: If it contains either of the tal-lines below I get the following error message: Please try out the following patch and re

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

2007-02-20 Thread Andreas Jung
--On 19. Februar 2007 12:29:34 -0800 Jostein Leira <[EMAIL PROTECTED]> wrote: If it contains either of the tal-lines below I get the following error message: I can reproduce this error. Obviously RestrictedPython.compile_restricted_eval() can't deal correctly with unicode strings

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

2007-02-19 Thread Jostein Leira
Dieter, Andreas and Daryl Here comes a detailed description of a new Zope-installation I just made on a new Debian (testing) machine. Here are the steps to reproduce my problem. (I'm still not sure it is a problem other than me not understanding how this should work). Downloading Zop

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

2007-02-19 Thread Dieter Maurer
Jostein Leira wrote at 2007-2-18 16:29 -0500: >I have experienced on my installation that Zope decides that the >character set should be iso-8859-1 for IE7 even no HTTP_ACCEPT_CHARSET >is sent from IE7 and preferred charset is utf-8. Firefox submits >HTTP_ACCEPT_CHARSET and Zope handles that OK. I

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

2007-02-19 Thread Andreas Jung
--On 18. Februar 2007 16:29:43 -0500 Jostein Leira <[EMAIL PROTECTED]> wrote: Have set sys.setdefaultencoding('utf-8') in /usr/local/lib/python2.4/site.py. Have set management_page_charset='utf-8' as property of / in ZMI. Have set default-zpublisher-encoding utf-8 in etc/zope.conf. Changing

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

2007-02-19 Thread Daryl Daly
On Sun, February 18, 2007 1:29 pm, Jostein Leira wrote: > After the comments in the Collector above I'm wondering what to do if I > should not set the sys.setdefaultencoding()? Not changing the default > encoding I always get a decode error when trying to save a page template > with non-ascii cha

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

2007-02-18 Thread Jostein Leira
I have experienced on my installation that Zope decides that the character set should be iso-8859-1 for IE7 even no HTTP_ACCEPT_CHARSET is sent from IE7 and preferred charset is utf-8. Firefox submits HTTP_ACCEPT_CHARSET and Zope handles that OK. http://www.zope.org/Collectors/Zope/2280