[z3-five] Zope 2.10 and UnicodeDecodeErrors

Andreas Jung lists at zopyx.com
Wed Oct 4 05:32:39 CEST 2006


Possibly a a problem with the new ZPT engine from ZPT. Please put this into 
the Zope bugtracker (preferred with a *unittest* demonstrating this issue).

-aj

--On 2. Oktober 2006 14:53:39 +0200 eXt <restless.being at gmail.com> wrote:

> 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
> _______________________________________________
> z3-five mailing list
> z3-five at codespeak.net
> http://codespeak.net/mailman/listinfo/z3-five



-- 
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: info at zopyx.com - Phone +49 - 7071 - 793376
E-Publishing, Python, Zope & Plone development, Consulting
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://codespeak.net/pipermail/z3-five/attachments/20061004/ea19c2e3/attachment-0001.pgp 


More information about the z3-five mailing list