[Zope] Re: tal:content="structure... and unicode... How to get it work in Zope 2.10.4 ?

Andreas Jung lists at zopyx.com
Wed Jul 25 09:24:14 EDT 2007



--On 25. Juli 2007 15:12:37 +0200 Andreas Elvers <andreas at work.de> wrote:

> Andreas Jung wrote:
>
>>> <span tal:replace="structure python:u'deja vu'"></span>
>
>>>
>>>
>>
>> Likely because you're using the u'...' notation. However I have no clue
>> why do you want to work with unicode strings this way...this looks
>> somewhat artificial (independent of the behavior).
>>
>
> You are right. The u'...' notation does no good in a page template. It was
> just a test to understand unicode strings in page templates.
>
> Moving the string out into a python script and calling the template
> gives me deja vu as expected.
>
> example script:
> mystring = u'déjà vu'
> return context.template(mystring=mystring)
>
> example template:
> mystring: <span tal:replace="structure options/mystring"></span>
>
>

or use python: unicode(...) inside TALES - BUT ONLY if necessary.

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/attachments/20070725/de0e7c0a/attachment.bin


More information about the Zope mailing list