Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 073DA64FC26 for ; Thu, 25 Sep 2008 05:13:11 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 31626-06 for ; Thu, 25 Sep 2008 05:13:03 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.233]) by postgresql.org (Postfix) with ESMTP id 3AB9064FC01 for ; Thu, 25 Sep 2008 05:13:02 -0300 (ADT) Received: by rv-out-0506.google.com with SMTP id b25so285187rvf.43 for ; Thu, 25 Sep 2008 01:13:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=r5tTt2k2M6aVXpP9Gu9nA5aTSUGTIvsqdAgKos5VpS0=; b=LsRUqhC4TpXgyEVNfPbsi290Nz3XsGUUwW0NhMkg8RS4z5t7C2cpoEyO1pywHki2Qm qxRyDsHp5CSrvlMsVjUqzfDSnDRk/Lf0Sd8+TnZiHgZt55qRXHZcY49uhhU9XINGe5m3 Wu2lVAiegA8JbNmTbxTpjGZrv/z8DVBYbj9Cw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=hSTrl2fi2DZrpWYmnvHgjWOGp59sLnz3C+7EaViqNO9AanYq+emTioSXl6AH3ujBSx hSJrcwo26+5DSgOGlD9xDyQOdDdRLwATbp00Gk/EDJJpdiFuU3dWDHyuntt2nlBK/Oby TCrRZtsLAx8yrQMJgVc+iAKKJotTre4Y3eQA0= Received: by 10.141.137.16 with SMTP id p16mr3965477rvn.192.1222330380610; Thu, 25 Sep 2008 01:13:00 -0700 (PDT) Received: by 10.141.74.11 with HTTP; Thu, 25 Sep 2008 01:13:00 -0700 (PDT) Message-ID: Date: Thu, 25 Sep 2008 02:13:00 -0600 From: "Scott Marlowe" To: "Claus Guttesen" Subject: Re: iso-8859-1 and utf-8 Cc: pgsql-admin@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200809/298 X-Sequence-Number: 30391 On Thu, Sep 25, 2008 at 1:59 AM, Claus Guttesen wrote: > Hi. > > I found out by accident that my db-dump, at least in ver. 8.3.3, > automagically converts from iso-8859-1 to utf-8. Our db has been > around since January 2000 and iso-8859-1 was chosen back then as > encoding. When I occasionally imported the nightly dump to a test-db > it would complain very early during the import and abort if the > encoding was incorrect. I think this was also the case with 8.3.1 > although I'm not certain. I'm guessing that the client encoding is set to utf-8 instead of iso-8859-1 on the client end. pg automatically converts to the client encoding of the user connecting / environment. I know that at least 8.2 supports the -E switch to set client encoding. psql --help MUCH SNIPPED: -E, --encoding=ENCODING dump the data in encoding ENCODING