Re: ASCII to UNICODE conversion problems - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: ASCII to UNICODE conversion problems
Date
Msg-id Pine.BSO.4.56.0505111900070.27750@leary.csoft.net
Whole thread Raw
In response to ASCII to UNICODE conversion problems  ("Ronald Gallagher" <RGallagher@psych.org>)
Responses Re: ASCII to UNICODE conversion problems
List pgsql-jdbc

On Wed, 11 May 2005, Ronald Gallagher wrote:

> I have read a lot online about how I need to convert my ASCII database
> into UNICODE but I haven't been able to successfully do that.  I have
> dumped the DB and then added SET CLIENT_ENCODING TO 'UNICODE'; to the
> top of the dump file and then tried to restore it to a UNICODE encoded
> database.  When I tried this only some of the tables (I assume the ones
> without special characters) got imported, but many tables had zero rows.

Basically the JDBC driver was detecting the fact that your data is not
unicode.  You've put this into a file and labeled it unicode (via SET
client_encoding), so now the server is complaining that your data is not
unicode.

You need to determine what encoding your data is actually in and convert
it to unicode with something like iconv.

> I also read about a patch for the JDBC driver.  Where can I get this
> patch and does it work?

Any patch dealing with encodings is going to require you to know what
encoding your data really is, so I don't specifically know what you are
referring to, I do know it is not going to magically solve your problems.

Kris Jurka


pgsql-jdbc by date:

Previous
From: "Ronald Gallagher"
Date:
Subject: ASCII to UNICODE conversion problems
Next
From: Warren Killian
Date:
Subject: Re: PostgreSQL/Tomcat JNDI Datasource Questions