[Zope-dev] Yet more unicode and page template weirdness
Chris Withers
chris at simplistix.co.uk
Wed Oct 13 03:53:08 EDT 2010
Hi All,
In Zope 2.12, try putting the following in a TTW ZPT:
<tal:c content="›"/>
...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
More information about the Zope-Dev
mailing list