X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 37F1E9DC81A for ; Fri, 10 Feb 2006 04:44:57 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 31719-04 for ; Fri, 10 Feb 2006 04:44:57 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from projects.commandprompt.com (host-130.commandprompt.net [207.173.203.130]) by postgresql.org (Postfix) with ESMTP id 088E49DC818 for ; Fri, 10 Feb 2006 04:44:54 -0400 (AST) Received: from evim.gunduz.org (dsl.static8121514250.ttnet.net.tr [81.215.14.250] (may be forged)) (authenticated bits=0) by projects.commandprompt.com (8.13.4/8.13.4) with ESMTP id k1A8qPoW030954; Fri, 10 Feb 2006 00:52:26 -0800 Subject: Re: Migration From: Devrim GUNDUZ To: James Dey Cc: "pgsql-admin@postgresql.org" In-Reply-To: <20060210083824.0654A4480@ctb-mesg8.saix.net> References: <20060210083824.0654A4480@ctb-mesg8.saix.net> Content-Type: text/plain; charset=utf-8 Organization: Command Prompt, Inc. Date: Fri, 10 Feb 2006 10:44:55 +0200 Message-Id: <1139561095.16736.18.camel@evim.gunduz.org> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-22) Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV version 0.87.1, clamav-milter version 0.87 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (projects.commandprompt.com [192.168.2.159]); Fri, 10 Feb 2006 00:52:27 -0800 (PST) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.161 required=5 tests=[AWL=0.161] X-Spam-Score: 0.161 X-Spam-Level: X-Archive-Number: 200602/96 X-Sequence-Number: 20517 Hi, On Fri, 2006-02-10 at 10:38 +0200, James Dey wrote: > I have installed PostgreSQL 8.1 onto a new box, and when trying to > create a new database, even when specifiying –encoding=UNICODE I > cannot create UNICODE dbs, it makes them all UTF-8. > > > Then when I try and restore a DB dump, but keep on getting invalid > “UTF-8 byte sequence detected near byte xxx” and although the restore > continues, a lot of data is missing. http://developer.postgresql.org/docs/postgres/release-8-1.html "Some users are having problems loading UTF-8 data into 8.1.X. This is because previous versions allowed invalid UTF-8 byte sequences to be entered into the database, and this release properly accepts only valid UTF-8 sequences. One way to correct a dumpfile is to run the command iconv -c -f UTF-8 -t UTF-8 -o cleanfile.sql dumpfile.sql. The -c option removes invalid character sequences. A diff of the two files will show the sequences that are invalid. iconv reads the entire input file into memory so it might be necessary to use split to break up the dump into multiple smaller files for processing." Regards, -- The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564 PostgreSQL Replication, Consulting, Custom Development, 24x7 support Managed Services, Shared and Dedicated Hosting Co-Authors: PL/php, plPerlNG - http://www.commandprompt.com/