Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZOBrt-0008Fm-SK for pgsql-jdbc@arkaria.postgresql.org; Sat, 08 Aug 2015 21:41:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZOBrt-00061m-6I for pgsql-jdbc@arkaria.postgresql.org; Sat, 08 Aug 2015 21:41:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZOBrP-0005TE-5e for pgsql-jdbc@postgresql.org; Sat, 08 Aug 2015 21:40:59 +0000 Received: from gateway.pangburngroup.com ([12.230.133.165] helo=mail.liquidcore.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZOBrM-0002h3-FH for pgsql-jdbc@postgresql.org; Sat, 08 Aug 2015 21:40:58 +0000 Received: (from root@localhost) by mail.liquidcore.com (8.14.4/8.14.4) id t78Lertf024145; Sat, 8 Aug 2015 16:40:53 -0500 Received: from [192.168.0.234] (ppasalalinux.nqadmin.com [192.168.0.234]) by mail.nqadmin.com with SMTP id 65tq72fb67i4e5c72dta98peu2; Sat, 08 Aug 2015 16:40:52 -0500 (CDT) (envelope-from dbadmin@nqadmin.com) Message-ID: <55C67764.1010601@nqadmin.com> Date: Sat, 08 Aug 2015 16:40:52 -0500 From: Prasanth Reddy Reply-To: dbadmin@nqadmin.com User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org, Bosco Rama Subject: Fwd: Re: Re: Postgresql 9.4.4 - ERROR: invalid byte sequence for encoding "UTF8": 0x92 References: <55C67705.209@nqadmin.com> In-Reply-To: <55C67705.209@nqadmin.com> X-Forwarded-Message-Id: <55C67705.209@nqadmin.com> Content-Type: multipart/alternative; boundary="------------050505080709010808090302" X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org This is a multi-part message in MIME format. --------------050505080709010808090302 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit -------- Forwarded Message -------- Subject: Re: Re: Postgresql 9.4.4 - ERROR: invalid byte sequence for encoding "UTF8": 0x92 Date: Sat, 08 Aug 2015 16:39:17 -0500 From: Prasanth Reddy Reply-To: dbadmin@nqadmin.com To: Bosco Rama 1. Is the content vetting new in 9.4? 2. Is there an option to ask the driver not to vet the content? Some times when the users copy notes from a word document there will be some characters invalid in UTF8. Most of these should only be in notes columns. 3. Is there a way to check the content and fix it/remove invalid characters? 4. Is there an option to force the driver to not update database with invalid characters? Appreciate your help. Thanks, Prasanth ------------------Original Message-------------------------- On 08/08/15 10:49, Prasanth Reddy wrote: > [snip] > 12:42:02.505 (1) <=BE ParameterStatus(client_encoding = UTF8) [snip] > 12:42:02.506 (1) <=BE ParameterStatus(server_encoding = SQL_ASCII) There's your problem. The client is expecting UTF8 while the server is storing un-vetted SQL_ASCII. You will need to change one of the components' choice of encoding and/or enforce content conformance in the data. Another choice, in cases of known and expected non-compliance, is to use bytea casting to bypass the automated content vetting. But your choice in this case is going to be driven by the ease with which you can alter your application vs the server-side changes that would be needed. HTH, Bosco. --------------050505080709010808090302 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit


-------- Forwarded Message --------
Subject: Re: Re: Postgresql 9.4.4 - ERROR: invalid byte sequence for encoding "UTF8": 0x92
Date: Sat, 08 Aug 2015 16:39:17 -0500
From: Prasanth Reddy <dbadmin@nqadmin.com>
Reply-To: dbadmin@nqadmin.com
To: Bosco Rama <postgres@boscorama.com>


1. Is the content vetting new in 9.4?
2. Is there an option to ask the driver not to vet the content? Some times when the users copy notes from a word document there will be some characters invalid in UTF8. Most of these should only be in
notes columns.
3. Is there a way to check the content and fix it/remove invalid characters?
4. Is there an option to force the driver to not update database with invalid characters?

Appreciate your help.

Thanks,
Prasanth

------------------Original Message--------------------------

On 08/08/15 10:49, Prasanth Reddy wrote:
>
[snip]
> 12:42:02.505 (1)  <=BE ParameterStatus(client_encoding = UTF8)
[snip]
> 12:42:02.506 (1)  <=BE ParameterStatus(server_encoding = SQL_ASCII)

There's your problem.  The client is expecting UTF8 while the server
is storing un-vetted SQL_ASCII.  You will need to change one of the
components' choice of encoding and/or enforce content conformance in the
data.  Another choice, in cases of known and expected non-compliance, is
to use bytea casting to bypass the automated content vetting.  But your
choice in this case is going to be driven by the ease with which you can
alter your application vs the server-side changes that would be needed.

HTH,
Bosco.



--------------050505080709010808090302--