[Zope] unicodedecoderror in page templates

Willi Langenberger wlang at wu-wien.ac.at
Sun May 20 16:02:31 EDT 2007


According to Andreas Jung:
> [...]
> >> --On 20. Mai 2007 14:20:38 +0200 Einar Næss Jensen
> >> <einar.nass.jensen at gmail.com> wrote:
> >>
> >> > When I get errors like:
> >> > UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position
> >> > 2940: ordinal not in range(128)
> >> > how can I locate the character which causes the error?
> >> > In particular: where is the position (2940 in the example)?
>
> [...]
>
> As Peter wrote: you are likely mixing somewhere different encodings with
> unicode or something similar. Which Zope version are you using?
> If 2.10 then you might check at the UnicodeConflictResolver as introduced
> in Zope 2.10 (check the release notes). Otherwise ensure that you are not 
> mixing unicode strings with non-unicode strings.

With Zope < 2.10 you can try the following recipe to get right (ie
wrong) part of the template:

  http://zwiki.org/UnicodeDecodeErrors


\wlang{}

-- 
Willi.Langenberger at wu-wien.ac.at                Fax: +43/1/31336/9207
Zentrum fuer Informatikdienste, Wirtschaftsuniversitaet Wien, Austria


More information about the Zope mailing list