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

Dieter Maurer dieter at handshake.de
Fri Jan 13 16:49:43 EST 2006


Tino Wildenhain wrote at 2006-1-13 16:45 +0100:
> ...
>Maybe just have new uZPT with Unicode and leave the "old" ZPT allone?
>Maybe with limited ability to "add" old ZPT from ZMI or such.
>
>This would solve the backward-compatibility problems and would be a more
>smooth transition w/o the need of upgrade hacks and "strict" hacks
>(after all, we arent perl/php ;))

I fear it is not that easy:

  Unless we set Python's "defaultencoding" to the site encoding
  (and we have such a thing), Python cannot mix Unicode and non-Unicode.

  Thus, your "old" ZPT's would need to use only other old ZPT's and
  "old" Python scripts and "old" methods (returning encoded texts)
  while "strict" ZPT's would need to use only new (strict) ZPT's, scripts
  and methods. Quite unfeasible...

-- 
Dieter


More information about the Zope-Dev mailing list