[z3-five] Zope 2.10 and UnicodeDecodeErrors
Philipp von Weitershausen
philipp at weitershausen.de
Sat Oct 7 23:14:56 CEST 2006
Chris Withers wrote:
> eXt wrote:
>> I read it but I think I faced a different problem here. I use Zope 2.10 and
>> very simple PageTemplate that is not dynamic at all. I don't have mixin of
>> different types of strings etc.
>
> I believe you have a mixture of strings and unicodes, whether or not you
> realise it...
Right. The problem is this: the Zope 2.9 ZPT implementation uses str's
internally. In good ol' Zope 2 times, people weren't using unicode but
8bit strings which works fine. If you're using unicode, that also works
fine, because the str's that Zope 2.9 ZPTs use internally are ASCII only.
The problem arises in Zope 2.10 which uses unicode's internally (instead
of str's). That makes it impossible to include 8bit strings in ZPTs
(because unicode and 8bit strings can't be combined).
Here's some more background on the issue and a proposed fix:
http://www.zope.org/Collectors/Zope/2180
If this solves the problem, we should apply the patch.
More information about the z3-five
mailing list