Takayuki Shimizukawa wrote:
> 2009/8/22 Chris Withers <ch...@simplistix.co.uk>:
>> The first type of problem occurs when a form is submitted and the form
>> fields contain encoded strings. Somewhere down the line I get:
> The first type, I don't know.
>> The second type of problem only occurs in IE and Safari, where viewing a
>> page that contains some non-ascii-able data:
> The second type, (maybe) similer probrem reported to launchpad.
> https://bugs.launchpad.net/zope2/+bug/160968
>> - Why am I getting this decoding error only with these browsers? Firefox
>> and Chrome work just fine... Is the publisher doing something special
>> with a header these browsers send that IE and Safari are not? If so, how
>> do I make it do the "right thing" for IE and Safari?
> Are concerned that HTTP_ACCEPT_CHARSET http header will probably
> not be sent from client browser (IE6,7, Safari).
> When HTTP_ACCEPT_CHARSET not in HTTP request headers,
> zope.publisher use UTF-8 encoding for publishing.

Well, I just solved the problem with a large setdefaultencoding hammer :-)

Annoyingly, this required even more evil, since sitecustomize.py is no 
longer found anywhere sensible in Python 2.5, so I ended up with a 
buildout that looks like the following:

parts = instance
extends = 
versions = versions

zope2 = 2.12.0b4

recipe = zc.recipe.egg
eggs = ${buildout:eggs}
interpreter = py
scripts = runzope zopectl
initialization =
    import sys
    sys.argv[1:1] = ['-C','${buildout:directory}/etc/instance.conf']

Evil huh? ;-)

Hope this helps someone...


Simplistix - Content Management, Batch Processing & Python Consulting
            - http://www.simplistix.co.uk
Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to