Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id AD7BE9FBD97 for ; Mon, 18 Jun 2007 14:56:41 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 63693-01-10 for ; Mon, 18 Jun 2007 14:56:23 -0300 (ADT) X-Greylist: delayed 00:06:58.136049 by SQLgrey-1.7.5 Received: from mail21.bluewin.ch (mail21.bluewin.ch [195.186.18.66]) by postgresql.org (Postfix) with ESMTP id ED5849FC123 for ; Mon, 18 Jun 2007 14:54:26 -0300 (ADT) Received: from [192.168.1.74] (83.79.80.160) by mail21.bluewin.ch (Bluewin 7.3.121) id 46727DDC000BD3CA for pgsql-admin@postgresql.org; Mon, 18 Jun 2007 17:47:31 +0000 From: Ivo Rossacher To: pgsql-admin@postgresql.org Subject: Re: Converting a DB from SQL_ASCII to UTF-8 Date: Mon, 18 Jun 2007 19:47:29 +0200 User-Agent: KMail/1.9.5 References: <200706181636.20224@zmi.at> In-Reply-To: <200706181636.20224@zmi.at> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200706181947.30614.rossacher@bluewin.ch> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/143 X-Sequence-Number: 25811 There is no general answer to the question. It highly depends on how the da= ta=20 was entered. SQL_ASCII is not an encoding but more the absence of any encoding. So whate= ver=20 the client sends will be put into the database. So if you entered data with= =20 different encodings from the client side (typically different clients on=20 different operating systems). What to do with the data depends highly on th= e=20 used encodings of the clients. If you are very lucky and all entries were=20 based on the same encoding you might run iconv or recode on the dump and=20 reload the corrected dump. Otherwise you will have to manually, with the he= lp=20 of recode or iconv, adjust the dump. If your server is once on UTF-8 the server will convert from and to the=20 encoding of your client for you. SQL_ASCII asks the server not to convert=20 anything. Best regards Ivo Am Montag, 18. Juni 2007 16:36 schrieb Michael Monnerie: > Dear list, > > how would I convert an existing database (dbmail mail server, > http://dbmail.org/) from SQL_ASCII to UTF-8? > > I cannot just dump and reload, because: > > psql:/mnt/dbmail:191030: FEHLER: ung=FCltige Byte-Sequenz f=FCr > Kodierung =BBUTF8=AB: 0xdc62 > TIP: Dieser Fehler kann auch auftreten, wenn die Bytesequenz nicht mit > der Kodierung =FCbereinstimmt, die der Server erwartet, welche > durch =BBclient_encoding=AB bestimmt wird. > > (How could I tell postfix to speak with me in english?) > > Now what would be the correct way to convert, without destroying any of > the DB contents? There are e-mails there, so binary values are > important, too. > > mfg zmi