开发者

Where Zope 2 encodes/decode request.form.items

Plone 3.3.x

On one server, self.request.post.values() are unicode (correct). On another server, they are bytestrings.

What is going on?

Where in the depth of Zope monster th开发者_如何学Pythonis is decided? Why they are different? Why I am loosing all hair before I have turned 30?


By default Zope 2 leaves the request values encoded. But some form libraries (formlib, z3c.form) were written for Zope 3 and want to deal with Unicode, so there is a helper in Five (processInputs) which they call to decode the request before doing anything else

plone.z3cform does this by monkey-patching the base form class's update method to call processInputs. It sounds like that is not getting called in your case, for some reason.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜