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.89) (envelope-from ) id 1iS2XF-0007bP-UP for pgsql-bugs@arkaria.postgresql.org; Tue, 05 Nov 2019 17:22:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iS2XD-000158-7H for pgsql-bugs@arkaria.postgresql.org; Tue, 05 Nov 2019 17:22:27 +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 1iS2XC-000151-WC for pgsql-bugs@lists.postgresql.org; Tue, 05 Nov 2019 17:22:27 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iS2XA-0002Tp-7C for pgsql-bugs@lists.postgresql.org; Tue, 05 Nov 2019 17:22:26 +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 xA5HML4b011660; Tue, 5 Nov 2019 12:22:21 -0500 From: Tom Lane To: Bruce Momjian cc: "Skjalg A. Skagen" , "pgsql-bugs@lists.postgresql.org" Subject: Re: PostgreSQL 12 installation fails because locale name contained non-english characters In-reply-to: <20191105024819.GB12780@momjian.us> References: <_Rkh_eJ7FKRUdGms9GAub53-5uvodq4uvTIrbgsTQ13wwHJwj7ofpHXUUtT0JMQft6oXI68hqJTx1bLIaejbuTyu29xeTGrSBCCgl40U1GA=@pm.me> <20191105024819.GB12780@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Mon, 04 Nov 2019 21:48:19 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <11658.1572974541.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 05 Nov 2019 12:22:21 -0500 Message-ID: <11659.1572974541@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Bruce Momjian writes: > On Thu, Oct 24, 2019 at 11:06:01AM +0000, Skjalg A. Skagen wrote: >> I tried to install PostgreSQL 12 with the "Norwegian Bokm=C3=A5l, Norwa= y" locale in >> hope that it would, among other things, provide proper support for Norw= egian >> characters out-of-the-box. >> But initcluster.vbs appear to fail during post-install because the loca= le name >> contains a Norwegian character that is being mishandled (full log in at= tached >> zip file): >> initdb: error: invalid locale name "NorwegianBokm=E2=80=A0l,Norway" > This has been fixed with the this patch: > https://www.postgresql.org/message-id/E1iMcHC-0007Ci-7G@gemulon.postgre= sql.org Hm, I'm not entirely sure that it has been. The original code supposed that the locale name is spelled "Norwegian (Bokm=C3=A5l)_Norway", and the recent patch you mention extended that to allow "Norwegian Bokm=C3=A5l_Nor= way". But this report, if accurate, shows yet another variant. Skjalg, would you confirm that there's a comma and space before "Norway" in the locale name as you see it? (Your log clearly shows it with a space in the registry entries, but it looks like initdb might be seeing it as not having any spaces, which is why I'm confused.) I wonder whether we need to relax the matching code to be entirely agnostic about spaces and punctuation in the Windows locale name. regards, tom lane