X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id EF806D1B1B0 for ; Mon, 28 Jun 2004 18:38:35 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 40850-08 for ; Mon, 28 Jun 2004 21:38:27 +0000 (GMT) Received: from mail1.bluewin.ch (mail1.bluewin.ch [195.186.1.74]) by svr1.postgresql.org (Postfix) with ESMTP id 6F7F3D1B191 for ; Mon, 28 Jun 2004 18:38:24 -0300 (ADT) Received: from server.ptools (62.203.49.124) by mail1.bluewin.ch (Bluewin AG 7.0.028) id 40D19B9C001707A8 for pgsql-admin@postgresql.org; Mon, 28 Jun 2004 21:38:25 +0000 From: Ivo Rossacher To: pgsql-admin@postgresql.org Subject: Change the character encoding of a database Date: Mon, 28 Jun 2004 23:38:24 +0200 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200406282338.25074.rossacher@bluewin.ch> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200406/356 X-Sequence-Number: 14016 Hi All, I do have a database which was created with the encoding SQL_ASCII and used with German, French and Italien strings. Until recently there was only a Linux client, an all worked fine (Suse 8.1). Now there is a new Windows client which does have a different idea of the encoding. I did some tests and found out that the encoding UNICODE does work properly for both clients. The question now is how to change the encoding of database from SQL_ASCII to UNICODE? I did try to dump the database by pgdump database > dump.dmp, droped the database, recreate it with the encoding UNICODE and restore the dump by psql database < dump.dmp which worked after some small changes (change the client encoding to UNICODE) in the dump.dmp. Without the changes in the dump.dmp there was a error message about invalide codes and no import at all. With the changes there are still some encoding mistakes (wrong signes in the strings) but the import basically works. The server actually runs on the same machine as the client (Suse 8.1). I think there is a problem with the import because the linux system is not set to use UNICODE. Is there an way to get the data converted correctly? -- Ivo Rossacher