[Zope-dev] [Zope 2.10] ZPT going Unicode

Andreas Jung lists at andreas-jung.com
Thu Jan 5 06:47:20 EST 2006


As you might know I worked on the integration of the Zope 3 ZPT 
implementation for Zope 2.10. Before commiting the changes to the trunk I 
would like discuss my approach for Zope 2.10

  - the ZopePageTemplate and PageTemplateFile classes will be replaced
    with wrapper classes around corresponding Zope 3 classes (no changes
    to the API, the existing unittest do pass with the wrappers)

  - the wrapper implementations store the content as Python unicode strings.
    The encoding of the content must be specified when creating/uploading
    new instances (either through the ZMI or through the 'encoding'
    parameters  of the constructors). If the content is XML-ish then the
    encoding is taken from the XML preamble (defaults to utf8)

  - the ZMI screens for ZPTs use a _fixed_ UTF-8 encoding (is this also 
fine
    for asian users?)


  - deprecation of _all_ other methods, modules etc. from
    Products/PageTemplates (removal in 2.12 except of the wrapper classes)

  - deprecation of the TAL module (removal in 2.12)

Open:

  - The ZPublisher will convert a 'unicode' ZPT using
    default_zpublisher_encoding (zope.conf) to a byte stream. The current
    encoding is iso-8859-15. I think it would make sense to change it to
    utf8. Otherwise we must explicitly set the content-type with 
charset=utf8 set. Thoughts?



ToDo: in-place conversion of persistent ZPT instance through setstate() or 
so...

Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20060105/2a8902ce/attachment.bin


More information about the Zope-Dev mailing list