On Wed, Oct 13, 2010 at 08:53:08AM +0100, Chris Withers wrote:
> Hi All,
> In Zope 2.12, try putting the following in a TTW ZPT:
> <tal:c content="&#8250;"/>

Are you sure you didn't mean

  <tal:c content="string:&#8250;"/>

?  Because I am pretty sure your TALES namespace does not contain
a variable named "›".

> ...nothing more, nothing less.
> On save, I get:
> Compilation failed
> <type 'exceptions.UnicodeEncodeError'>: 'ascii' codec can't encode 
> character u'\u203a' in position 0: ordinal not in range(128)
> Any ideas where the non-ascii character is in the above?

&#8250; is the non-ASCII character, obviously.

The way XML works, all entities in an attribute value are decoded before
being interpreted, so your TALES interpreter gets an expression
u'\u203a' which it then fails to interpret.

Marius Gedminas
http://pov.lt/ -- Zope 3/BlueBream consulting and development

Attachment: signature.asc
Description: Digital signature

Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope )

Reply via email to