I don't know if this is common knowledge, but I couldn't find anything about it on the web. So I hacked it myself.

When querying a Postgresql database using unicode in Zope 2.10 via ZPsycopgda2, the adapter will return unicode data in plain strings. To force unicode strings to be returned go to your Products folder and create a directory like ZPsycopgda2SetUnicode.

In this directory put an __init__.py file containing this code:

import psycopg2
import psycopg2.extensions

After this restart Zope. ZPsycopgda2 should now return unicode strings.

- Andreas

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

Reply via email to