[Zope-dev] Should PageTemplate._text be a unicode or an encoded string in Zope 2.9.3?

Chris Withers chris at simplistix.co.uk
Fri Jul 21 10:51:42 EDT 2006


Andreas Jung wrote:
> 
>    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. 

Yay ;-)

> AFAIK
> WevDAV the encoding is not available from a WebDAV request?!

Really? :-(

> On the other hand there is code available that tries to obtain
> the encoding from the XML preamble (sniffEncoding)...

where?

> and the very other 
> hand
> there 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's a BOM when it's at home?

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk



More information about the Zope-Dev mailing list