[z3-five] unicodes and strings in Zope 2.9's ZPT with Zope 3's i18n

Maciej Wisniowski maciej.wisniowski at coig.katowice.pl
Sun Jul 16 23:55:28 CEST 2006


>I see. When in doubt, just make sure that anything ending up in a ZPT is
>unicode. Of course, ideally, those document titles would be stored not
>in UTF-8 but in unicode...
>  
>
Does this mean that I should use unicode everywhere, even on data
returned from database?

I'm having some issues with unicode-decode errors and five too, but
I'm not using i18n machinery. I have a view with a page template
(containing some national characters) and a view class with function
that returns utf-8 encoded string.

Inserting string from the function into ZPT causes unicode-decode error
but... just on one machine. Zope on two other computers
doesn't report any errors.

Changing my function to return unicode fixes the problem and view works
correctly everywhere, but it is confucing that code works on one machine
and fails on the other.
Zope configuration is same:
z-publisher-encoding utf-8 and locale pl_PL.UTF-8. Operating
system is set to utf-8 everywhere. Any hints what should I check?
Possibly it's somethin with OS, but I don't know what...

-- 
Maciej Wisniowski




More information about the z3-five mailing list