Hello list,

I just encountered that this python code:

conn = pgdb.connect("brick", database="stuff")
cursor = conn.cursor()
cursor.execute(u"INSERT INTO items (itemnr, description, ends) VALUES
('foo', 'bär', '2008-01-01 00:00:00');")

does yield:

Traceback (most recent call last):
  File "./EGunQuery", line 198, in <module>
    cursor.execute(u"INSERT INTO items (itemnr, description, ends)
VALUES ('foo', 'bär', '2008-01-01 00:00:00');")
  File "/usr/lib64/python2.5/site-packages/pgdb.py", line 174, in execute
    self.executemany(operation, (params,))
  File "/usr/lib64/python2.5/site-packages/pgdb.py", line 197, in
executemany
    raise OperationalError, "internal error in '%s': %s" % (sql,err)
pg.OperationalError

while on the console

# echo "INSERT INTO items (itemnr, description, ends) VALUES ('foo',
'bär', '2008-01-01 00:00:00');" | psql -h brick stuff
INSERT 0 1
#

Works beautifully. Is there a reason why pgdb chokes on UTF-8 umlauts
and is there a known workaround?

Thanks in advance,
Johannes
_______________________________________________
PyGreSQL mailing list
[email protected]
http://mailman.vex.net/mailman/listinfo/pygresql

Reply via email to