[Zope-dev] Unicode treatment in 2.6b1

Florent Guillaume fg@nuxeo.com
Fri, 27 Sep 2002 01:32:52 +0200


> For PageTemplates, the various blocks produced by the template and
> python are sent to a StringIO-like object, which is responsible for
> converting them into a coherent thing when its getvalue() method is
> called. At the moment it doesn't deal very well mixed Unicode and
> non-Unicode strings so the reported failures don't surprise me.

BTW an example of a failing PageTemplate is:

<html>
  <span tal:replace="python:u'hello'" /> café
</html>

Because, deep inside StringIO, it tries to do something like:
        ''.join([u'hello', ' café'])

--
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com