[egenix-users] UTF-8 problem
Charlie Clark
charlie at egenix.com
Thu Jun 16 20:49:20 CEST 2005
On 2005-06-16 at 19:14:12 [+0200], Martin Winkler <mw at agami.at> wrote:
> On Wed, 2005-06-08 at 19:31 +0200, Charlie Clark wrote:
> >
> > But that isn't quite the same thing which is why I suggest you try the
> > statements at the Python level.
>
> Ok, just did that:
>
> import mx.ODBC.iODBC
> db = mx.ODBC.iODBC.DriverConnect('DSN=User;UID=;PWD=')
> c = db.cursor()
>
> c.execute("select name1 from persons where id = 33")
> res = c.fetchall()
> print r[0][0]
>
> brings the umlauts as usual.
>
> but:
>
> c.execute("update projects set title='täst 80a' where id = 80")
> c.execute("select title from projects where id = 80")
> print r[0][0]
>
> gives me the double-encoded utf-8 characters. ("täst 80a")
Do you get the same results from both databases? PostgreSQL and Caché?
Charlie
More information about the egenix-users
mailing list