Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 5A8732E3007 for ; Sat, 9 Feb 2008 10:47:00 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 54047-02 for ; Sat, 9 Feb 2008 10:46:57 -0400 (AST) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id 5696C2E2FBD for ; Sat, 9 Feb 2008 10:46:57 -0400 (AST) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.8/8.13.8) with ESMTP id m19EkpIK063614 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 9 Feb 2008 07:46:54 -0700 (MST) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.14.2/8.14.2) with ESMTP id m19EkoTv018739; Sat, 9 Feb 2008 07:46:50 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.14.2/8.14.2/Submit) id m19EkowX018738; Sat, 9 Feb 2008 07:46:50 -0700 (MST) (envelope-from mfuhr) Date: Sat, 9 Feb 2008 07:46:50 -0700 From: Michael Fuhr To: Mike Blackwell Cc: pgsql-admin@postgresql.org Subject: Re: Character encoding conversion Message-ID: <20080209144649.GA16941@winnie.fuhr.org> References: <47ADB8AA.6070305@sbcglobal.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47ADB8AA.6070305@sbcglobal.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/117 X-Sequence-Number: 28191 On Sat, Feb 09, 2008 at 08:28:58AM -0600, Mike Blackwell wrote: > I have a database which was originally created with LATIN1 encoding. > I'd like to move it to UTF8. The data will load ok (COPY) but I am > getting 'invalid byte sequence for encoding..." messages when accessing > the data. What's the complete error message? What's the output of the following query in a session that gets the error? select name, setting from pg_settings where name ~ 'encoding'; > Is there a way to automatically convert the offending characters, or to > easily locate them in a pg_dump file so they can be converted by hand? You said the data loaded without error, right? Let's see if we can figure out why queries are failing before considering what corrective action to take. -- Michael Fuhr