--On 17. Juli 2006 17:11:54 +0100 Chris Withers <[EMAIL PROTECTED]> wrote:
Andreas Jung wrote:Zope 2.10 comes with the ZPT implementation of Zope 3 which works nicely with unicode strings. However the 2.10 won't enforce the use of unicode strings for backward compatibility. However (at least) the ZopePageTemplate class constructor has a flag 'strict' to enforce the use of unicode.Okay, but what actually gets stored in the ZPT when editing it via ZMI or WebDAV?
Here's the code: security.declareProtected(change_page_templates, 'PUT') def PUT(self, REQUEST, RESPONSE): """ Handle HTTP PUT requests """ self.dav__init(REQUEST, RESPONSE) self.dav__simpleifhandler(REQUEST, RESPONSE, refresh=1) ## XXX this should be unicode or we must pass an encoding self.pt_edit(REQUEST.get('BODY', '')) RESPONSE.setStatus(204) return RESPONSE As you can see from the comment..there is some work to do. AFAIK WevDAV the encoding is not available from a WebDAV request?! On the other hand there is code available that tries to obtain the encoding from the XML preamble (sniffEncoding)...and the very other handthere is still a problem with this method since the encoding can be determined by the BOM (if available)...this currently not handled through
the code...I think I'll have a closer look at the code once again this week.
What about loading FS ZPT's and things like CMF's FSZPT?
Ask Tres or Jens :-) -aj
Description: PGP signature
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )