Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XVlUo-0003ZL-Lt for pgsql-bugs@arkaria.postgresql.org; Sun, 21 Sep 2014 18:04:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XVlUo-0004YD-5S for pgsql-bugs@arkaria.postgresql.org; Sun, 21 Sep 2014 18:04:26 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XVlUn-0004Y6-0o for pgsql-bugs@postgresql.org; Sun, 21 Sep 2014 18:04:25 +0000 Received: from mail-pd0-x234.google.com ([2607:f8b0:400e:c02::234]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XVlUh-0004e7-Tc for pgsql-bugs@postgresql.org; Sun, 21 Sep 2014 18:04:23 +0000 Received: by mail-pd0-f180.google.com with SMTP id r10so2937619pdi.25 for ; Sun, 21 Sep 2014 11:04:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=bO36VZD1v8K9JR2orgFzBSwbu5I1iqPbuYVgK9dtH3w=; b=GLSCrg3qW95lw6Gh/vMxkloGSdSvfZBMskIUBZUxrLzbfHVErWL17QFnRE1mMI/XBE MsNV8LcxDklRkX84N4dAEyP6ZivVQFBGSKHs3LcH+FMavn7Ls40ox6Zx0BuswPv9SvLs UlV+MRTarMCvr/XyJBV9qqglUfYptbHIkYN8M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=bO36VZD1v8K9JR2orgFzBSwbu5I1iqPbuYVgK9dtH3w=; b=Q0AycCIcfFM3/day5ZZ1wffyFy9Z33I8Cka1u4+7K7MzaXnp12ESFoNrZmWvd+EOLz /J5B5UWNdNyfrvetB5GL97mTiSIsCB1KF2Q1bPPX+EdcDPf2qMrEPIWw3o62G5es6e1y jbuK5Y2BJ5DK2ujWoLuUq1/5qxm4VEWNycDIVZqkd99BanLWIlJW3dxrKfky5oZa0OzV ls5jFC6Wqo4ZsTq/6p7az6F5mXl9WbgI6PrnLtg3ebQczwJgT+b5/vfFuu4qpzvqdB3z 1NubGJZie9aWzWeFWbm9ND1+CIC9g8gpQBQ1ZONB+pfxwDjvkq1gFTJsXFca8Ngg5zni QPQQ== X-Gm-Message-State: ALoCoQm5p8Jp19IPwQ7DhUF0dxjtTpBZX6+5vEZ2OPOCG7BZI7O01d8s1EO/Kjs8Lodz6KNlacaR X-Received: by 10.68.241.10 with SMTP id we10mr18407948pbc.42.1411322656342; Sun, 21 Sep 2014 11:04:16 -0700 (PDT) Received: from tornado.leadboat.com (c-174-62-109-97.hsd1.ca.comcast.net. [174.62.109.97]) by mx.google.com with ESMTPSA id pg2sm7236442pbb.43.2014.09.21.11.04.15 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 21 Sep 2014 11:04:15 -0700 (PDT) Date: Sun, 21 Sep 2014 14:04:13 -0400 From: Noah Misch To: Tom Lane Cc: Alon , pgsql-bugs@postgresql.org Subject: Re: Re: BUG =?iso-8859-1?Q?#11431?= =?iso-8859-1?Q?=3A_Failing_to_backup_and_restore_a_Windows_postgres_datab?= =?iso-8859-1?Q?ase=2C_with_Norwegian_Bokm=E5l?= locale. Message-ID: <20140921180413.GA1585212@tornado.leadboat.com> References: <20140915230427.2486.29437@wrigleys.postgresql.org> <1411164953375-5819745.post@n5.nabble.com> <20140921051846.GA1565935@tornado.leadboat.com> <7107.1411316005@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7107.1411316005@sss.pgh.pa.us> User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On Sun, Sep 21, 2014 at 12:13:25PM -0400, Tom Lane wrote: > Noah Misch writes: > > On Fri, Sep 19, 2014 at 03:15:53PM -0700, Alon wrote: > >> The pg_dump file contains this command: > >> CREATE DATABASE workgroup WITH TEMPLATE = template0 ENCODING = 'UTF8' > >> LC_COLLATE = 'Norwegian (Bokmål)_Norway.1252' LC_CTYPE = 'Norwegian > >> (Bokmål)_Norway.1252'; > > > In WIN1252, "e5 6c 29" is "ål)". We're likely failing to set client_encoding > > at some essential point in the process. > > The level of stupidity needed to use non-ASCII characters in a locale name > is breathtaking. What were Microsoft thinking? Windows Vista did deprecate that locale name style in favor of "nb-NO". setlocale(LC_x, "") still returns the old style, though. You need PostgreSQL built with VS2012 or later to use "nb-NO" style; see IsoLocaleName(). > How are we supposed to > guess what encoding applies when setting the encoding? Windows functions with "char *" arguments where encoding matters typically expect the argument to be in the Windows ANSI code page. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs