Re: Fwd: Re: Re: Postgresql 9.4.4 - ERROR: invalid byte sequence for encoding "UTF8": 0x92

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Fwd: Re: Re: Postgresql 9.4.4 - ERROR: invalid byte sequence for encoding "UTF8": 0x92
Date: 2015-08-08 22:00:16
Message-ID: 55C67BF0.5000308@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On 8/8/2015 2:40 PM, Prasanth Reddy wrote:
> 1. Is the content vetting new in 9.4?

no, PostgreSQL has always been strict about content types.

> 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.

the driver isn't doing this, its happening in the postgres
database. you should fix invalid input at the source application
before sending to the database.

> 3. Is there a way to check the content and fix it/remove invalid characters?

define 'invalid character', then fix it. this SQL_ASCII field that
contains 0x92, what character code is that supposed to represent ?

> 4. Is there an option to force the driver to not update database with invalid characters?

the database (NOT the driver) does that already. if you try and insert
invalid data, you get an error and have to rollback the transaction.

--
john r pierce, recycling bits in santa cruz

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Prasanth Reddy 2015-08-08 22:34:15 Re: Fwd: Re: Re: Postgresql 9.4.4 - ERROR: invalid byte sequence for encoding "UTF8": 0x92
Previous Message Prasanth Reddy 2015-08-08 21:40:52 Fwd: Re: Re: Postgresql 9.4.4 - ERROR: invalid byte sequence for encoding "UTF8": 0x92