Re: ASCII to UNICODE conversion problems

From: Kris Jurka <books(at)ejurka(dot)com>
To: Ronald Gallagher <RGallagher(at)psych(dot)org>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: ASCII to UNICODE conversion problems
Date: 2005-05-12 00:02:56
Message-ID: Pine.BSO.4.56.0505111900070.27750@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Warren Killian 2005-05-12 00:15:08 Re: PostgreSQL/Tomcat JNDI Datasource Questions
Previous Message Dave Cramer 2005-05-11 23:05:36 Re: PostgreSQL/Tomcat JNDI Datasource Questions