Search Postgresql Archives

Re: utf8 errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2013/6/25 Jiří Pavlovský <jiri@xxxxxxxxxxxx>:
> On 25.6.2013 21:39, Pavel Stehule wrote:
>> Hello
>>
>> in this mailing list is not high traffic,
>>
>> please try to ask on postgresql general mailing list
>>
>> http://www.postgresql.org/list/pgsql-general/
>>
>> or
>>
>> Czech google groups https://groups.google.com/forum/?hl=cs#!forum/postgresql-cz
>>
>> 2013/6/25 Jiří Pavlovský <jiri@xxxxxxxxxxxx>:
>>> Hello,
>>>
>>> I have a win32 application. It uses gtk for GUI and postgres. Recently I
>>> upgraded to newer gtk and postgres 9.2. I'm now getting utf8 errors from
>>> postgres.
>>> The thing I don't understand that the queries, which postgres complains
>>> about, seem to be perfectly valid.
>>>
>>> For example
>>>  LOG:  statement: INSERT INTO recipients (DealID,
>>> Contactid)                               VALUES (29009, 9387)
>>>  ERROR:  invalid byte sequence for encoding "UTF8": 0x9c
>>>
>> This message is strange - I expect so *ID columns are numeric. Can you
>> show a table definition?
>
> Yes, sure:
>
> CREATE TABLE recipients
> (
>   contactid integer,
>   dealid integer,
>   CONSTRAINT "$1" FOREIGN KEY (contactid)
>       REFERENCES contacts (contactid) MATCH SIMPLE
>       ON UPDATE CASCADE ON DELETE CASCADE,
>   CONSTRAINT recipients_dealid_fk FOREIGN KEY (dealid)
>       REFERENCES subscription (dealid) MATCH SIMPLE
>       ON UPDATE CASCADE ON DELETE CASCADE,
>   CONSTRAINT recipients_dealid_key UNIQUE (dealid, contactid)
> )
>

There is some wrong - pg can raise this message when detect some error
in conversion between client encoding and server encoding. But you
speaking so your client encoding and database encoding is same, and
this situation should not be possible. So you should to recheck your
client encoding and real input.

In old versions Postgres don't check UTF well, so it was possible to
store some strange chars, but it is not possible now.

Pavel Stehule

> --
> Jiří Pavlovský
>


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux