Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 70743631ADA; Thu, 29 Jan 2009 13:46:02 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 53646-01-5; Thu, 29 Jan 2009 13:45:54 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from svr2.hagander.net (svr2.hagander.net [88.198.128.226]) by mail.postgresql.org (Postfix) with ESMTP id 7BB056327E1; Thu, 29 Jan 2009 13:45:27 -0400 (AST) Received: from dynamic.hagander.net ([127.0.0.1]) (encrypted and authenticated) by svr2.hagander.net (Postfix) with ESMTP id 0AB67DCD149; Thu, 29 Jan 2009 18:45:26 +0100 (CET) Received: from [127.0.0.1] (localhost [127.0.0.1]) by mha-laptop.hagander.net (Postfix) with ESMTP id 799371241C5; Thu, 29 Jan 2009 18:45:25 +0100 (CET) Message-ID: <4981EB35.5060106@hagander.net> Date: Thu, 29 Jan 2009 18:45:25 +0100 From: Magnus Hagander User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: Tom Lane CC: Moshe Ben-Shoham , pgsql-general@postgresql.org, pgsql-admin@postgresql.org Subject: Re: [GENERAL] Encoding problem using pg_dumpall References: <75E4C42D37E6A74E9FB57C2E9F1300D60107073E@tiger.nexperience.com> <28817.1233242176@sss.pgh.pa.us> <4981E805.7040302@hagander.net> <7403.1233250794@sss.pgh.pa.us> In-Reply-To: <7403.1233250794@sss.pgh.pa.us> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: 200901/161 X-Sequence-Number: 31208 Tom Lane wrote: > Magnus Hagander writes: >> Tom Lane wrote: >>> (Hmm, actually it looks like pg_dumpall hasn't got a -E switch, >>> which seems like an oversight. So you need to fix your locale, >>> or else use pg_dump directly.) > >> IIRC, you can't set the windows console to be UTF8. > > Ugh. That seems to raise the priority of having a -E switch quite > a lot. I'm surprised no one has complained of this before. Most people use pg_dump. I know I recommend everbody to use pg_dump to dump the database, because you can use -Fc. Then just use pg_dumpall to dump the globals, and they normally don't have any non-ascii in them. > I think it should be possible to work around it by setting > PGCLIENTENCODING in the environment, but I dunno how to do that > on Windows. That's a simple set PGCLIENTENCODING=UTF8 //Magnus