Received: from finch-post-12.mail.demon.net (finch-post-12.mail.demon.net [194.217.242.41]) by postgresql.org (Postfix) with ESMTP id 680B747546E for ; Sun, 21 Apr 2002 15:00:57 -0400 (EDT) Received: from lfix.demon.co.uk ([158.152.59.127] helo=linda.lfix.co.uk) by finch-post-12.mail.demon.net with esmtp (Exim 3.35 #1) id 16zMa0-000OYp-0C; Sun, 21 Apr 2002 19:00:56 +0000 Received: from localhost ([127.0.0.1] helo=localhost.localdomain ident=olly) by linda.lfix.co.uk with esmtp (Exim 3.35 #1 (Debian)) id 16zMZz-0004xp-00; Sun, 21 Apr 2002 20:00:55 +0100 Subject: Re: Upgrading from 7.1.2 to 7.2.1 on new server From: Oliver Elphick To: Jean Huveneers Cc: pgsql-admin@postgresql.org In-Reply-To: <71E201BE5E881C46811BA160694C5FCB014F97@fs1000.farcourier.com> References: <71E201BE5E881C46811BA160694C5FCB014F97@fs1000.farcourier.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-61BH5b9Y/JFn+fbPuiEn" X-Mailer: Ximian Evolution 1.0.3 Date: 21 Apr 2002 20:00:54 +0100 Message-Id: <1019415655.27903.3426.camel@linda> Mime-Version: 1.0 X-Archive-Number: 200204/188 X-Sequence-Number: 4076 --=-61BH5b9Y/JFn+fbPuiEn Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sun, 2002-04-21 at 14:45, Jean Huveneers wrote: > I've been using postgres 7.1.3 in production with a couple of unicode > databases. > Last week we bought a new server, i've installed RedHat Linux 7.2 on it > with postgres SQL 7.2.1. >=20 > Now, went i to move the data ('pg_dumpall > data_dump' on the old > server, psql template1 < data_dump data on the new server) i get an > error. psql continous but, same tables on the new server are not filled. > the error has something to do with 'illage unicode character sequence'. >=20 > Can somebody please give me some advise on how i fix these errors? or is > there another way to upgrade than via pg_dump?=20 The problem is that 7.1.3 and earlier did not check for valid unicode characters. Somehow, single characters with the eighth bit set were allowed into the data; these look like unicode leadins, and are rejected because they seem to be unicode characters above 0x10000. The solution is to set the client encoding to SQL-ASCII or maybe LATIN9 while reading them in; thus they get converted to unicode (UTF_8) between frontend and backend. I am not sure, however, whether this adequately protects real UTF-8 characters that may be mingled in the data. I suppose the alternative is to run a Perl script to check for high-bit characters that are not valid UTF-8 for characters below 0x10000. --=20 Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C "The sacrifices of God are a broken spirit; a broken=20 and a contrite heart, O God, thou wilt not despise."=20 Psalms 51:17=20 --=-61BH5b9Y/JFn+fbPuiEn Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQA8wwxmYU1MND4dDBwRAhAmAJ0ZeSfScnpe3Q55Z0PQn8kVUq554wCgsk2P nOos+p6IvJQtxnCZXfQJAwk= =qyWs -----END PGP SIGNATURE----- --=-61BH5b9Y/JFn+fbPuiEn--