[Zope-DB] psycopg insert into unicode problem

Federico Di Gregorio fog at initd.org
Wed Nov 2 17:57:42 EST 2005


Il giorno mer, 02/11/2005 alle 12.07 +0100, abraham.peter at freestart.hu
ha scritto:
[snip]
> (azon=id, nev=name)
> The postgres database is unicode encoded. What shall I do in order to
> insert these texts into database via zope? (with psql I can insert it
> smoothly.)

Pass a utf-8 encoded string or use a version of psycopg that supports
unicode strings and pass a unicode object.
 
-- 
Federico Di Gregorio                         http://people.initd.org/fog
Debian GNU/Linux Developer                                fog at debian.org
INIT.D Developer                                           fog at initd.org
  Spesso crescere ed andare a vivere da soli è l'unico modo di restare
   bambini.                                             -- Alice Fontana
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.zope.org/pipermail/zope-db/attachments/20051102/da296103/attachment.bin


More information about the Zope-DB mailing list