Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 4DD8F63406B for ; Wed, 10 Mar 2010 08:17:25 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 65702-01 for ; Wed, 10 Mar 2010 12:17:08 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from tremor.opencloud.co.nz (tremor.opencloud.co.nz [131.203.101.230]) by mail.postgresql.org (Postfix) with ESMTP id CE8446337BE for ; Wed, 10 Mar 2010 08:17:13 -0400 (AST) Received: from 121-98-80-66.bitstream.orcon.net.nz ([121.98.80.66] helo=[192.168.1.2]) by tremor.opencloud.co.nz with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NpKqZ-0001a4-EF; Thu, 11 Mar 2010 01:17:07 +1300 Message-ID: <4B978DBE.8090506@opencloud.com> Date: Thu, 11 Mar 2010 01:17:02 +1300 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Emmanuel Guiton CC: pgsql-jdbc@postgresql.org Subject: Re: JDBC driver, client_encoding and a SQL_ASCII database in production References: <4B977FFF.9030204@intrinsec.com> In-Reply-To: <4B977FFF.9030204@intrinsec.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=AWL=0.000, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201003/29 X-Sequence-Number: 20369 Emmanuel Guiton wrote: > Hello All, > > I am using Pentaho Data Integration (PDI) to transform a database in > production to some other database, correctly structured for my business > intelligence analysis purpose. > PDI uses the JDBC driver to perform the transformation. The issue is > that JDBC only works with UTF-8 as client_encoding while the charset of > the database in production is SQL_ASCII and was filled with ISO-8859-1 > characters (and is full of characters such as é è ô ...). The only way I > can get the correct string back is to use client_encoding='LATIN1'. > > Changing the character set of the original database is not an option as > it is in production. > > Anyone has a good idea on how could I proceed to get correctly the > content ? Take a copy of the production database, change the database encoding to be LATIN1, and do your conversion from that copy? -O