X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id CFC749FB2D6 for ; Mon, 14 Aug 2006 23:16:44 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 25639-09 for ; Tue, 15 Aug 2006 02:16:36 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail19.bluewin.ch (mail19.bluewin.ch [195.186.18.65]) by postgresql.org (Postfix) with ESMTP id 577C89FB1C8 for ; Mon, 14 Aug 2006 23:16:36 -0300 (ADT) Received: from [192.168.1.74] (83.77.188.108) by mail19.bluewin.ch (Bluewin 7.3.110.2) id 449253F800CC970A for pgsql-admin@postgresql.org; Tue, 15 Aug 2006 02:16:34 +0000 From: Ivo Rossacher To: pgsql-admin@postgresql.org Subject: Re: UTF8 Questions Date: Tue, 15 Aug 2006 04:16:18 +0200 User-Agent: KMail/1.8.2 References: <20060814224248.72408.qmail@web57113.mail.re3.yahoo.com> In-Reply-To: <20060814224248.72408.qmail@web57113.mail.re3.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200608150416.18953.rossacher@bluewin.ch> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200608/159 X-Sequence-Number: 22702 Am Dienstag, 15. August 2006 00.42 schrieb Abu Mushayeed: > We upgraded our Db from LATIN1 to UTF8 as follows: > > 1. new install with encoding=3DUTF8 > 2. pg_dump from old DB and import into new db using psql as follows: > pg_dump out of old_db|psql into new_db > 3. New feeds (data files) come in same as when the DB was latin1. If error > message from any load script like "Invalid UTF8 code ...", then, "set > client_encoding=3Dlatin1" in the script and run again and all is well.=20 So most probably the dump is latin1 (this was the clientencoding during=20 dumping). > 4. all=20 > the other scripts run on the UTF8 Db as is and no errors, meaning the > scripts has not been changed and is running as is before when DB was > latin1.=20 That there is no error message does not mean that there is no error in the= =20 encoding. It only means that there is no Invalid UTF8. So it is importent t= o=20 set the correct client encoding, which was used for the backup, also during= =20 restore. > 5. Now, some of the DB feeds (data files) is changing to UTF8. What=20 > needs to be done when the data feeds changes to UTF8. When you plan to insert non Latin1 codes into the database you have to chan= ge=20 the clientencoding for backup/restore to UTF8. Have a look at chapter 20 of the manual for different possibilies to set th= e=20 client encoding. Best regards Ivo > > Any other thoughts or if there is a problem that anyone sees, please help > me with a solution. > > Thanks > > > --------------------------------- > Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rat= es > starting at 1=C2=A2/min.