Re: [BUG] - Invalid UNICODE character sequence found(0xc000) - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: [BUG] - Invalid UNICODE character sequence found(0xc000)
Date
Msg-id 27455.1075692374@sss.pgh.pa.us
Whole thread Raw
In response to Re: [BUG] - Invalid UNICODE character sequence found(0xc000)  ("Antonio Gallardo" <antonio@apache.org>)
Responses Re: [BUG] - Invalid UNICODE character sequence found(0xc000)
List pgsql-jdbc
"Antonio Gallardo" <antonio@apache.org> writes:
> Paul Thomas dijo:
>> I can reproduce this on my Fedora machine. On an older system with RH7.2
>> and PG 7.3.4 compiled from source, I don't get the problem. Re-compiling
>> from source on the Fedora machine still gives the error. HTH

> I already filled a bug in Fedora:
> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=113231

I was finally able to reproduce this with Paul's help.

The bug turns out not to be Fedora-specific at all.  I believe it will
happen on any platform if you are using both a multibyte database
encoding (such as Unicode) *and* a non-C locale.

PG 7.4 has a more restricted form of the bug --- it's not locale
specific but does still require a multibyte encoding.  Here is a Unicode
example:

test=# select * from test where txtfield like '\277%'; --
ERROR:  invalid byte sequence for encoding "UNICODE": 0xc0

I've committed fixes in both CVS branches.

            regards, tom lane

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: FW: [webmaster] jdbc site: documentation links broken
Next
From: "Luca Di Mauro"
Date:
Subject: Problem wih JDBC driver under Windows XP