Yet more unicode and page template weirdness

Chris Withers <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <[email protected]>
Hi All,

In Zope 2.12, try putting the following in a TTW ZPT:

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

...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)

If I try and view the template, unsurprisingly, I get:

Module ZPublisher.Publish, line 127, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 47, in call_object
Module Shared.DC.Scripts.Bindings, line 324, in __call__
Module Shared.DC.Scripts.Bindings, line 361, in _bindAndExec
Module Products.PageTemplates.ZopePageTemplate, line 335, in _exec
Module Products.PageTemplates.ZopePageTemplate, line 432, in pt_render
Module Products.PageTemplates.PageTemplate, line 80, in pt_render
Module zope.pagetemplate.pagetemplate, line 109, in pt_render
Warning: Compilation failed
Warning: <type 'exceptions.UnicodeEncodeError'>: 'ascii' codec can't 
encode character u'\u203a' in position 0: ordinal not in range(128)
PTRuntimeError: ['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?

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
            - http://www.simplistix.co.uk
_______________________________________________
Zope-Dev maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.