X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id BB35B528A9 for ; Wed, 25 May 2005 08:28:31 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 63707-06 for ; Wed, 25 May 2005 11:28:27 +0000 (GMT) Received: from mail.logix-tt.com (serval.logix-tt.com [213.239.221.42]) by svr1.postgresql.org (Postfix) with ESMTP id B8D2552864 for ; Wed, 25 May 2005 08:28:25 -0300 (ADT) Received: from kingfisher.intern.logix-tt.com (J039e.j.pppool.de [85.74.3.158]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.logix-tt.com (Postfix) with ESMTP id 8ACE324411B; Wed, 25 May 2005 13:28:42 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by kingfisher.intern.logix-tt.com (Postfix) with ESMTP id 39CC1AAFE3; Wed, 25 May 2005 13:25:53 +0200 (CEST) Message-ID: <429460C0.4030803@logix-tt.com> Date: Wed, 25 May 2005 13:25:52 +0200 From: Markus Schaber Organization: Logical Tracking and Tracing International AG, Switzerland User-Agent: Debian Thunderbird 1.0.2 (X11/20050331) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kris Jurka Cc: Ronald Gallagher , pgsql-jdbc@postgresql.org Subject: Re: ASCII to UNICODE conversion problems References: In-Reply-To: X-Enigmail-Version: 0.91.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.077 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200505/99 X-Sequence-Number: 12930 Hi, Ronald, Kris Jurka 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. Another possibility is to create the database in unicode (or any encoding that can store your data), and put "SET CLIENT_ENCODING TO 'your-real-encoding';" at the top of your dump file. This way PostgreSQL will convert your data from your-real-encoding to the database encoding on dump load, an then to unicode with JDBC access. HTH, Markus