Error "invalid byte sequence for encoding UTF8" on insert into BYTEA column
| От | Alan Millington |
|---|---|
| Тема | Error "invalid byte sequence for encoding UTF8" on insert into BYTEA column |
| Дата | |
| Msg-id | 726739.54988.qm@web25406.mail.ukl.yahoo.com обсуждение |
| Ответы |
Re: Error "invalid byte sequence for encoding UTF8" on
insert into BYTEA column
|
| Список | 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. |
В списке pgsql-general по дате отправления: