Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pbr4D-0003MH-57 for pgsql-general@arkaria.postgresql.org; Mon, 13 Mar 2023 22:54:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pbr4B-0000ZF-Ja for pgsql-general@arkaria.postgresql.org; Mon, 13 Mar 2023 22:54:55 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pbr4B-0000Z5-82 for pgsql-general@lists.postgresql.org; Mon, 13 Mar 2023 22:54:55 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pbr47-0001ao-LY for pgsql-general@lists.postgresql.org; Mon, 13 Mar 2023 22:54:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 32DMshgr2371654; Mon, 13 Mar 2023 18:54:43 -0400 From: Tom Lane To: "Peter J. Holzer" cc: pgsql-general@lists.postgresql.org, Celia McInnis Subject: =?UTF-8?Q?Re:_Uppercase_version_of_=C3=9F_desired?= In-reply-to: <20230313224505.snjtnuz75s76w3zi@hjp.at> References: <20230313224505.snjtnuz75s76w3zi@hjp.at> Comments: In-reply-to "Peter J. Holzer" message dated "Mon, 13 Mar 2023 23:45:05 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <2371652.1678748083.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Mon, 13 Mar 2023 18:54:43 -0400 Message-ID: <2371653.1678748083@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "Peter J. Holzer" writes: > On 2023-03-13 17:38:51 -0400, Celia McInnis wrote: >> I would be really happy if postgresql had an upper case version of the ß >> german character. > But the 'ß' is a bit special as it is usually uppercased to 'SS' > (although 'ẞ' is now officially allowed, too). > Apparently your (and my) locale doesn't uppercase ß at all, which isn't > correct according to German spelling rules but was very common in the > last decades. Our code for libc locales doesn't support upcasing 'ß' to 'SS', because it uses towlower() which can only manage one-character-to-one-character transformations. It should work for upcasing to 'ẞ', but as you say, you need to find a locale that thinks that should happen. You might have better luck if you have a version of Postgres that supports ICU and you can use an ICU locale. That code path doesn't appear to have any hard-wired assumption about how many characters in convert to how many out. regards, tom lane