[z3-five] Zope 2.10 and UnicodeDecodeErrors
eXt
restless.being at gmail.com
Mon Oct 2 14:53:39 CEST 2006
Hi
I installed Zope 2.10.0.c1 on my Kubuntu Dapper (also tried Fedora 4)
set 'default-zpublisher-encoding' to 'utf-8' at zope.conf and... ecountered a
UnicodeDecodeError while trying to use a view page template containing
international characters (utf-8).
It's very easy to reproduce my problem - just put ViewsTutorial (from Five
docs/products directory) to zope instance's Producs folder, and add unicode
characters to 'someview.pt', restart Zope, create Five Demo Content instance
via ZMI and view it. Exactly the same code worked well at Zope 2.9.4.
Some meaningful code below:
someview.pt:
<html>
<body>
żabka (text with national characters)
</body>
</html>
configure.zcml:
<browser:page
for=".democontent.IDemoContent"
name="someview.html"
template="someview.pt"
permission="zope2.ViewManagementScreens"
/>
Full traceback is:
Traceback (innermost last):
* Module ZPublisher.Publish, line 115, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 41, in call_object
* Module Products.Five.browser.metaconfigure, line 404, in __call__
* Module Shared.DC.Scripts.Bindings, line 313, in __call__
* Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
* Module Products.PageTemplates.PageTemplateFile, line 121, in _exec
* Module Products.PageTemplates.PageTemplate, line 89, in pt_render
* Module zope.pagetemplate.pagetemplate, line 118, in pt_render
Warning: Macro expansion failed
Warning: exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte
0xc5 in position 14: ordinal not in range(128)
* Module StringIO, line 271, in getvalue
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 14:
ordinal not in range(128)
What is going on?
--
Jakub Wisniowski
More information about the z3-five
mailing list