Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id DC872633FF7 for ; Wed, 10 Mar 2010 09:32:46 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 26841-08 for ; Wed, 10 Mar 2010 13:32:36 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp4.intrinsec.com (smtp4.Intrinsec.com [194.6.240.34]) by mail.postgresql.org (Postfix) with ESMTP id 3A87C632A15 for ; Wed, 10 Mar 2010 09:32:36 -0400 (AST) Received: from ISC-SRV-EXC02.intrinsec.neurones.sa (nsa-srv-fw.intrinsec.com [10.254.0.1]) by smtp4.intrinsec.com (Postfix) with ESMTP id 937DC494EB for ; Wed, 10 Mar 2010 14:32:39 +0100 (CET) thread-index: AcrAViIAhsCvV1E/RIOsUo6KxwJwOQ== Received: from [192.168.2.76] (192.168.2.76) by ISC-SRV-EXC02.Intrinsec.neurones.sa (192.168.2.10) with Microsoft SMTP Server id 8.2.213.0; Wed, 10 Mar 2010 14:32:30 +0100 Content-Class: urn:content-classes:message Importance: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18005 Message-ID: <4B979F69.5090707@intrinsec.com> Date: Wed, 10 Mar 2010 14:32:25 +0100 From: Emmanuel Guiton User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Subject: Re: JDBC driver, client_encoding and a SQL_ASCII database in production References: <4B977FFF.9030204@intrinsec.com> <4B978DBE.8090506@opencloud.com> In-Reply-To: <4B978DBE.8090506@opencloud.com> Content-Type: text/plain; format=flowed; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=-10 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 201003/30 X-Sequence-Number: 20370 Oliver Jowett wrote: > Emmanuel Guiton wrote: > =20 >> 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 =C3=A9 =C3=A8 =C3=B4 = ...). The only way I >> can get the correct string back is to use client_encoding=3D'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 ? >> =20 > > Take a copy of the production database, change the database encoding = to > be LATIN1, and do your conversion from that copy? > > -O > =20 Thanks for the idea, but the volume is too heavy and performance=20 problems already too important on the original database to overload it=20 with an additional daily dump. This is not just a one-shot issue. The analysis tool I am setting up is=20 made to continually analyze the activity of my company. Would there be a way to get the binary content of text field ? Maybe that could be the solution, performing the encoding conversion at=20 the application level, then. - Emmanuel --=20 Ing=C3=A9nieur =C3=A9tude et d=C3=A9veloppement Intrinsec 215, avenue Georges Clemenceau 92000 Nanterre http://www.intrinsec.com =20 Emmanuel GUITON Ing=C3=A9nieur d=C3=A9veloppement=20 Standard : +33 1 41 91 77 77 l Fax : +33 1 41 91 77 78 215, avenue Georges Clemenceau l 92024 NANTERRE http://www.intrinsec.com/img_site/content/20091216V2_Intrinsec_diversite.= pdf http://www.intrinsec.com/ =20