Re: Uppercase version of ß desired - Mailing list pgsql-general

From Peter J. Holzer
Subject Re: Uppercase version of ß desired
Date
Msg-id 20230313224505.snjtnuz75s76w3zi@hjp.at
Whole thread Raw
In response to Uppercase version of ß desired  (Celia McInnis <celia.mcinnis@gmail.com>)
Responses Re: Uppercase version of ß desired
List pgsql-general
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. The wiki page
> https://en.wikipedia.org/wiki/%C3%9F
>
> indicates that the capital (U+1E9E ẞ LATIN CAPITAL LETTER SHARP S) was encoded
> by ISO 10646 in 2008.

The character is there, of course, and lower-casing it works as
expected:

hjp=> select 'ẞ', lower('ẞ');
╔══════════╤═══════╗
║ ?column? │ lower ║
╟──────────┼───────╢
║ ẞ        │ ß     ║
╚══════════╧═══════╝
(1 row)

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.

You can specify an alternate locale:

hjp=> select upper('ß');
╔═══════╗
║ upper ║
╟───────╢
║ ß     ║
╚═══════╝
(1 row)


hjp=> select upper('ß' collate "de-AT-x-icu");
╔═══════╗
║ upper ║
╟───────╢
║ SS    ║
╚═══════╝
(1 row)


The challenge now is to find a locale which uppercases ß to ẞ.

        hp

--
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachment

pgsql-general by date:

Previous
From: Michael Downey
Date:
Subject: Using GSSAPI/Kerbros/Active Directory: want the database user name to be the full name including the realm name without specifying the user
Next
From: Tom Lane
Date:
Subject: Re: Uppercase version of ß desired