Mixed client_encoding database question

From: "J(dot) Hondius" <jhondius(at)rem(dot)nl>
To: pgsql-general(at)postgresql(dot)org
Subject: Mixed client_encoding database question
Date: 2011-01-10 15:32:13
Message-ID: 4D2B267D.6020901@rem.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

We have a product with a PostgreSQLdatabase (unicode)
It has a (legacy) client app that uses client_encoding = win1521
The legacy app will be around for several years.
It cannot change to unicode.

There also is a new client app, written in java.
It uses client_encoding = unicode.

The problem: if someone inputs a non-win1252 character via the new java
app, the legacy app fails.
PostgreSQL returns an error: character blabla of encodig UTF-8 has no
equivalent in WIN1252.

What are my options to stop the legacy app from failing?
-Is there a setting to tell PostgreSQL to fail the character gracefully
by substuting it?
-Should i filter out all non win1252 charachters at the new java app and
substitute them? (not so nice, i'd like to have the chars in the db)
-?more?

Greetings, Joek

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bob Pawley 2011-01-10 16:21:35 Re: Remote Connection
Previous Message Nicolas Garfinkiel 2011-01-10 15:09:26 migrate hashname function from 8.1.x to 8.4