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 1iMYYa-00019B-Sg for pgsql-bugs@arkaria.postgresql.org; Mon, 21 Oct 2019 14:21:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iMYYY-0002Gw-0t for pgsql-bugs@arkaria.postgresql.org; Mon, 21 Oct 2019 14:21:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iMYYX-0002CC-Ly for pgsql-bugs@lists.postgresql.org; Mon, 21 Oct 2019 14:21:09 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iMYYU-0003Ir-Vw for pgsql-bugs@lists.postgresql.org; Mon, 21 Oct 2019 14:21:08 +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 x9LEKrA4000579; Mon, 21 Oct 2019 10:20:53 -0400 From: Tom Lane To: Robert Ford cc: pgsql-bugs@lists.postgresql.org, Heikki Linnakangas Subject: Re: =?UTF-8?Q?Re=3A_Re=3A_BUG_=2316068=3A_Collate_of_=27Norwegian_Bokm=C3=A5l=27_i?= =?UTF-8?Q?s_problematic?= In-reply-to: References: <16068-4cb6eeaa7eb46d93@postgresql.org> <1015.1571515401@sss.pgh.pa.us> <19079.1571608634@sss.pgh.pa.us> Comments: In-reply-to Robert Ford message dated "Mon, 21 Oct 2019 10:54:54 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <577.1571667653.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Mon, 21 Oct 2019 10:20:53 -0400 Message-ID: <578.1571667653@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Robert Ford writes: > Sorry about this, but the version was *"Windows 2016 standard*". I let the > installer stay on "Default locale" while installing. This results is a > config file with the following values: > # These settings are initialized by initdb, but they can be changed. > lc_messages = 'Norwegian Bokmål_Norway.1252' # locale for system error > message Okay, so we need to translate that string to 'Norwegian_Norway' too. That's an easy fix, but as far as I can tell from the past discussions about this, the bugs it'll fix are distinct from what you're complaining about here: > WARNING: Console code page (850) differs from Windows code page (1252) > 8-bit characters might not work correctly. See psql reference > page "Notes for Windows users" for details. We don't have any support for Windows code page 850. Looking at the wikipedia page about that doesn't make me much inclined to add it either: wikipedia says that (a) it's largely been obsoleted by 1252, and (b) there's confusion about what the code page's contents are, specifically whether it contains a euro sign. So my recommendation here is just to switch your console code page to 1252. > *postgres=# select * from pg_settings;ERROR: invalid byte sequence for > encoding "UTF8": 0xe5 0x6c 0x5f* That hex sequence looks suspiciously like "ål_" in CP1252, so this is an encoding confusion problem. I think it'd go away if you simplified these postgresql.conf entries to 'Norwegian_Norway.1252' and restarted. What I don't remember offhand is where the funny locale name spelling might've propagated besides these entries. regards, tom lane