[Zope3-Users] UnicodeDecodeError

David Johnson djohnson at jsatech.com
Mon Oct 2 03:56:02 EDT 2006


Good morning,

 

I'm getting a UnicodeDecodeError during the display of a ZPT and I'm not
sure how to get rid of it.  I know the problem is related to the fact that
we are trying to display text that contains characters above the 128 range.
We are displaying information from a database and unfortunately our users
have putting non-Unicode characters in.  We would be glad to just strip out
the non-compliant characters, but I am not sure how.  Any ideas or
suggestions are welcome.

 

  File "/usr/share/zope3/lib/python/zope/tal/talinterpreter.py", line 770,
in do_insertStructure_tal

    text = unicode(structure)

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

 

Corresponding TAL code:

        <td tal:content="structure python:view.emailLink(email.logdate,

 
email.emailsubject,email.emailto,email.emailfrom,email.emailbody)">

            <a>Password Sent</a>

--

David Johnson

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope3-users/attachments/20061002/1d8f8b63/attachment.htm


More information about the Zope3-users mailing list