Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id C531847656D for ; Tue, 17 Dec 2002 17:49:01 -0500 (EST) Received: from fusion.wineasy.se (fusion.wineasy.se [195.42.198.105]) by postgresql.org (Postfix) with ESMTP id 8819F4769E8 for ; Tue, 17 Dec 2002 17:48:19 -0500 (EST) Received: from petrus.schuldei.org (petrus.schuldei.org [81.27.1.16]) by fusion.wineasy.se (Postfix) with ESMTP id 282DF5823 for ; Tue, 17 Dec 2002 23:48:35 +0100 (CET) Received: from gabriel.schuldei.com (gabriel.schuldei.com [192.168.31.1]) by petrus.schuldei.org (Postfix) with ESMTP id 7AF794CE01 for ; Tue, 17 Dec 2002 23:48:18 +0100 (CET) Received: from lukas (lukas.schuldei.com [192.168.31.142]) by gabriel.schuldei.com (Postfix) with ESMTP id A13EA1750A for ; Tue, 17 Dec 2002 23:48:18 +0100 (CET) Received: by lukas (Postfix, from userid 1000) id 2964F2F0031; Tue, 17 Dec 2002 23:48:18 +0100 (CET) Date: Tue, 17 Dec 2002 23:48:18 +0100 From: Andreas Schuldei To: pgsql-admin@postgresql.org Subject: how to dump and restore unicode databases? Message-ID: <20021217224818.GA10840@lukas> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.4i X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/229 X-Sequence-Number: 6724 i have two machines, one with postgres 7.2.X and one with 7.3. Both their encodings are set to UNICODE. on the first i have crated a unicode database, with german, swedish and english texts, more to come. on that machine i dump the db with pg_dump -c -s ncg and pg_dump -D -a ncg. on that machine i can restore the structure and data of the database just fine. I also edit the dump to use the coziness of my texteditor to add larger amounts of text. i can restore those edited dumps just fine. then i try to restore that database on the postgres 7.3. since i get errors like ERROR: Invalid UNICODE character sequence found (0xe4636b) whenever a german or swedish special char occurs, i insert an \ecoding LATIN1 before the critical sections. then i can restore the complete database, with the difference that the special characters are garbage: รถ and similar. How can i dump unicode databases to asci so that they are restored as unicode? i would like to edit the dump, as explained above. or How can i restore the database with its special chars in tact?