ASCII to UNICODE conversion problems - Mailing list pgsql-jdbc

From Ronald Gallagher
Subject ASCII to UNICODE conversion problems
Date
Msg-id FCAD0432FD2FC449BEA84B820D36398501099845@ARES.psych.org
Whole thread Raw
Responses Re: ASCII to UNICODE conversion problems
List pgsql-jdbc

Hi all,

 

I am using the pg74.215.jdbc3.jar JDBC driver to connect to a PostgreSQL 7.4 database.  I am getting the common error:

 

Invalid character data was found. This is most likely caused by stored data containing characters that are invalid for the character set the database was created in. The most common example of this is storing 8bit data in a SQL_ASCII database.

 

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. 

 

Can someone please tell me how to convert an ASCII DB into a UNICODE DB so hopefully the JDBC driver will actually work?  I also read about a patch for the JDBC driver.  Where can I get this patch and does it work?

 

Thanks in advance for all your help,

Ron

 

 

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: PostgreSQL/Tomcat JNDI Datasource Questions
Next
From: Kris Jurka
Date:
Subject: Re: ASCII to UNICODE conversion problems