[Zope3-Users] TAL expression and ascii

Justin Fletcher justin at opensoft.ws
Thu Dec 13 19:20:52 EST 2007


Hello all,

I am trying to migrate some data into the ZODB.  I am storing this data
in a string, and later presenting the data in a ZPT similar to this:

<span tal:replace="context/content" />

This works fine for text that does not have any characters outside of
the ascii range, but for text that does I receive this error:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
3283: ordinal not in range(128)

The characters are typically things like what the HTML code &eacute;
would generate, but it is a fairly significant amount of text so I am
unsure specifically what characters are causing the problem.

My understanding is that Zope3 strings are Unicode so I don't understand
why the ascii range is a restriction.  Shouldn't these characters be
stored and presented transparently?

Am I misunderstanding something or doing something wrong?

I am using Grok 0.11.

Many thanks,
-Justin



More information about the Zope3-users mailing list