Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jIMpt-0002rt-0A for pgsql-general@arkaria.postgresql.org; Sun, 29 Mar 2020 01:34:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jIMpr-0002C8-Ml for pgsql-general@arkaria.postgresql.org; Sun, 29 Mar 2020 01:33:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jIMpr-0002Bz-Cu for pgsql-general@lists.postgresql.org; Sun, 29 Mar 2020 01:33:59 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jIMpk-0005tx-5B for pgsql-general@postgresql.org; Sun, 29 Mar 2020 01:33:59 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 02T1Xlib025117; Sat, 28 Mar 2020 21:33:47 -0400 From: Tom Lane To: "Andrus" cc: "pgsql-general" Subject: Re: could not determine encoding for locale "et_EE.UTF-8": codeset is "CPUTF-8" in pg_restore In-reply-to: <22672.1585442578@sss.pgh.pa.us> References: <22672.1585442578@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Sat, 28 Mar 2020 20:42:58 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <25115.1585445627.1@sss.pgh.pa.us> Date: Sat, 28 Mar 2020 21:33:47 -0400 Message-ID: <25116.1585445627@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > (I do agree that that message isn't the most helpful thing. It looks > like chklocale.c is overoptimistically assuming that what it's handed > is valid, even if GetLocaleInfoEx says it isn't.) After further digging, that optimism isn't *completely* without foundation; it seems to be based on the fact that we know setlocale() thought the locale string was OK. Which is interesting --- apparently Microsoft is more willing to accept Unix-style locale names than I thought. But they couldn't be bothered to make GetLocaleInfoEx() and setlocale() take the same set of strings ... regards, tom lane