On Fri, Sep 30, 2005 at 12:38:04PM +0200, Andreas Jung wrote:
> StructuredText does not work with UTF8 (when you mean this by mentioning
> unicode). There is a utf-8 patch for STX but this has other problems.
> Means: Don't use STX with multi-byte encodings...instead use reST.

Okay, that's clear now, thanks.  I have got it working now:

In etc/zope.conf:

rest-input-encoding utf-8
rest-output-encoding utf-8

Hm, now it seems to function without that locale setting as well.
Maybe Zope reads the locale correctly from my system already.

Anyway, my script is now:
import Products.PythonScripts.standard

print """
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
.. _Zope: http://www.zope.org/ 

I like à `Zöpe platform`__.

__ Zope_ 

print "ppsr(text):"
print ppsr(text)
print "</body>"

return printed

So no more switching from iso to utf with:

print ppsr(unicode(text,'iso-8859-1').encode('utf-8'))

So far as I can see this solves my problems.

Thanks for thinking with me, Andreas.

Maurits van Rees | http://maurits.vanrees.org/ [Dutch/Nederlands] 
Public GnuPG key:  http://maurits.vanrees.org/var/gpgkey.asc
"It can seem like you're doing just fine,
but the creep's creeping into your mind." - Neal Morse

Attachment: signature.asc
Description: Digital signature

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to