Unicode -> Python -> DBAPI -> PyPgSQL -> PostgreSQL

Rene Pijlman reply.in.the.newsgroup at my.address.is.invalid
Mon Nov 3 09:52:26 CET 2003


I can't seem to find any way to specify the character encoding with the DB
API implementation of PyPgSQL. There is no mention of encoding and Unicode
in the DB API v2.0 spec and the PyPgSQL README.

When I have Unicode strings in Python and store it in a PostgreSQL Unicode
database, will the data automatically be correctly encoded? Or do I need
to specify the UTF-8 client encoding on the database connection somehow?

I'm using the current packages of Debian stable (woody):
Python 2.2
PyPgSQL 2.0
PostgreSQL 7.2 (database created with UNICODE / UTF-8 encoding)

-- 
René Pijlman




More information about the Python-list mailing list