[Zope] ordinal not in range error in StringIO.py
Andreas Jung
lists at zopyx.com
Tue Apr 25 03:28:09 EDT 2006
--On 25. April 2006 10:25:45 +0300 Roman Susi <rnd at onego.ru> wrote:
> hi!
>
>
> My code produces the following traceback
> >
> when frontpage is published. I have analysed self.buflist and it seems
> that unicode strings are mixed with usual strings. Unicode strings come
> from .mo file.
> So, the question is why ZPublisher doesnt coerce different string before
> serving and what can I do in this situation?
>
> .po file has utf8 encoding. Publisher encoding is utf8.
>
The basic problem is that your are mixing somewhere unicode with
non-unicode string in your code. Try to isolate the related part in your
code and fix it. Either use unicode strings everywhere or use strings with
the *same*
encoding. Don't mix things.
-aj
--
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: info at zopyx.com - Phone +49 - 7071 - 793376
E-Publishing, Python, Zope & Plone development, Consulting
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20060425/bb17b96a/attachment.bin
More information about the Zope
mailing list