[z3-five] unicodes and strings in Zope 2.9's ZPT with Zope 3's i18n
Chris Withers
chris at simplistix.co.uk
Tue Jul 11 20:51:27 CEST 2006
Chris Withers wrote:
> Where in the ZPT/publishing stack do the unicodes get encode to strings
> then?
Answer: probably in the publisher somewhere.
The root of this was "my bad", but I'm documenting it here for poor
unfortunate souls in the future...
Since Zope 3's i18n stuff returns unicode, you need to be ultra careful
that the rest of your ZPT generates either 7-bit ascii or unicode.
In my case, I was inserting the utf-8 encoded title of a document into a
generated navigator...
*sigh*
Python's unicode error messages could be a little more helpful...
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
More information about the z3-five
mailing list