Skip site navigation (1) Skip section navigation (2)

Re: getquoted and unicode

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: psycopg(at)postgresql(dot)org
Subject: Re: getquoted and unicode
Date: 2011-01-23 11:42:42
Message-ID: 20110123114242.GB2360@hermes.hilbert.loc (view raw or flat)
Thread:
Lists: psycopg
On Sat, Jan 22, 2011 at 11:53:23PM -0800, Carl S. Yestrau Jr. 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.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

In response to

Responses

psycopg by date

Next:From: Karsten HilbertDate: 2011-01-23 11:54:26
Subject: Re: getquoted and unicode
Previous:From: Carl S. Yestrau Jr.Date: 2011-01-23 07:53:23
Subject: getquoted and unicode

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group