On Sun, Jan 23, 2011 at 12:42:42PM +0100, Karsten Hilbert wrote:
> > import psycopg2
> >
> > psycopg2.extensions.register_type(psycopg2.extensions.UNICODE)
> > adapted = psycopg2.extensions.adapt(u'test')
> > adapted.getquoted()
>
> That is strange because:
>
> adapted.adapted.encode(adapted.encoding)
>
> works just fine.
And
adapted.adapted being u'test'
adapted.encoding being 'latin-1'
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346