From: | rsmogura <rsmogura(at)mail(dot)softperience(dot)eu> |
---|---|
To: | <jhondius(at)rem(dot)nl> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Mixed client_encoding database question |
Date: | 2011-01-11 11:01:57 |
Message-ID: | 62c52eeff5c2c17979708087b908efab@mail.softperience.eu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
I suggest you to recreate database in WIN1521 encoding, so Java will
not write unsupported characters. As well you can configure JDBC in way
it will allow You to change client encoding, so you can change it to
WIN. In both of above You will get error when you will try to write
unsupported characters.
You may also do
http://www.postgresql.org/docs/8.4/interactive/sql-createconversion.html
Radosław Smogura,
http://softperience.eu
On Mon, 10 Jan 2011 16:32:13 +0100, J. Hondius wrote:
> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Nicolás Garfinkiel | 2011-01-11 12:01:36 | Re: migrate hashname function from 8.1.x to 8.4 |
Previous Message | Craig Ringer | 2011-01-11 10:29:51 | Re: migrate hashname function from 8.1.x to 8.4 |