X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id A617BD1B4FB for ; Fri, 24 Oct 2003 10:56:42 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 60643-07 for ; Fri, 24 Oct 2003 07:56:14 -0300 (ADT) Received: from smtp2.nblnetworks.fi (smtp2.nblnetworks.fi [217.30.182.231]) by svr1.postgresql.org (Postfix) with ESMTP id ED446D1B522 for ; Fri, 24 Oct 2003 07:55:54 -0300 (ADT) Received: from mailserver1.nebula.fi (mailserver1.nebula.fi [217.30.180.90]) by smtp2.nblnetworks.fi (8.12.8/8.12.8) with ESMTP id h9OAtcxL004973 for ; Fri, 24 Oct 2003 13:55:39 +0300 Received: from wificom.com (ws212.wificom.com [217.152.56.212]) by mailserver1.nebula.fi (8.12.8/8.12.8) with ESMTP id h9OAqgtj001527; Fri, 24 Oct 2003 13:52:43 +0300 Message-ID: <3F99052C.7000905@wificom.com> Date: Fri, 24 Oct 2003 13:55:40 +0300 From: James Cooper Reply-To: james.cooper@wificom.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en, en-us MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Migration Problems 7.2.3 -> 7.3.4 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/292 X-Sequence-Number: 10853 Good afternoon, I searched the archives and since I'm a relatively noivce user I'll have to run the risk of repeating already asked questions. I'm having a problem on two counts with migrating our database. Firstly the existing database is encoded as SQLASCII in which the majority of characters are from the Latin1 character set. I would like to migrate this table space to unicode. The problem is that when I create a database in unicode and try insert the backed up data I regulary get arbitrary error messages such as the following: Invalid UNICODE character sequence found (0xe9726f) After some examination I found that the characters essentially dropped are \347 \350 \351 \352 etc. I'm running 7.2.3 on Redhat 7.3 The steps I've followed are the following: 1. pgdump -dO -f /sql/SabServerBak.sql 2. CREATE DATABASE harrier WITH TEMPLATE = template0 ENCODING = 'unicode'; 3. psql harrier 4. \encoding latin1 5. \i /sql/SabServerBak.sql As a stop gap, I decided to persevere with SQLASCII. I tried dumping using: pgdump -dO -f /sql/SabServerBak.sql and pgdump -dO -Fc -f /sql/SabServerBak.sql CREATE DATABASE harrier WITH TEMPLATE = template0 ENCODING = 'sqlascii'; and restoring using: psql harrier \encoding latin1 \i /sql/SabServerBak.sql and pg_restore /sql/SabServerBap.sql -d harrier The problem is that when I look at the records via psql, they look fine. When I retrieve records via the JDBC interface, Hôtel for instance is rendered as H?l. The weird thing is that when I insert something like James Cööpér, it works fine, but is when I read it from psql it looks like garbage. Any clarification would be of great help, Thanks in advance. -- James Cooper Software Engineer, Wificom Technologies Ltd Uudenmaankatu 23 A Tel. +358 9 5627 4600 00120 Helsinki, Finland Fax. +358 9 5627 4601