From: | Alan Millington <admillington(at)yahoo(dot)co(dot)uk> |
---|---|
To: | Postgres general mailing list <pgsql-general(at)postgresql(dot)org> |
Subject: | Error "invalid byte sequence for encoding UTF8" on insert into BYTEA column |
Date: | 2010-01-21 19:54:32 |
Message-ID: | 726739.54988.qm@web25406.mail.ukl.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I am running Postgres 8.4.1 on Windows XP Professional Service Pack 3. My database is UTF8. My program code is written in Python, and to interface to Postgres I use mxODBC 3.0 and the PostgreSQL Unicode driver PSQLODBCW.DLL version 8.01.02.00 dated 31/01/2006.
Today for the first time since upgrading to Postgres 8.4.1 I tried out part of the code which inserts some binary data into a table. The insert failed with the error "invalid byte sequence for encoding UTF8". That is odd, because the column into which the insert was made is of type bytea: the data is meant to be binary data, not UTF8-encoded Unicode.
When I was using Postgres 8.1.4 the same code worked. My code, the mxODBC code and the driver are all unaltered: only the Postgres version has changed.. Is there something I can tweak to get it to work on Postgres 8.4.1?
I confirm that the driver option "bytea as LO" is checked. That has always been necessary in the past.
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Frankel | 2010-01-21 20:48:03 | Re: db cluster location |
Previous Message | Ivan Sergio Borgonovo | 2010-01-21 19:16:14 | Re: PgSQL problem: How to split strings into rows |