Re: ICU database? - Mailing list pgsql-general

From Laurenz Albe
Subject Re: ICU database?
Date
Msg-id 8a48b2b9efb16c38c12801c935e462badac0a491.camel@cybertec.at
Whole thread
In response to ICU database?  ("Zwettler Markus (OIZ)" <markus.zwettler@zuerich.ch>)
Responses Re: ICU database?
List pgsql-general
On Wed, 2026-08-05 at 12:55 +0000, Zwettler Markus (OIZ) wrote:
> I'm creating a PG cluster with Swiss High German ICU locales.
>
> I wonder why “collate = C” and “ctype = C” is shown?
>  
> initdb --locale-provider=icu --icu-locale=de-CH-x-icu -D /path/to/datainitdb
>  
> CREATE DATABASE eng001
>   WITH
>   OWNER = dbowner
>   ENCODING = 'UTF8'
>   LOCALE_PROVIDER = 'icu'
>   ICU_LOCALE = 'de-CH-x-icu'
>   ;

That's because you didn't specify a C library locale, so "initdb" took the
setting from your shell environment.

Try:

  initdb --locale-provider=icu --icu-locale=de-CH --locale=de_CH.utf8 -D /path/to/datainitdb

Many aspects of the locale are still taken from the C library.  It's mostly the
collations that will be taken from ICU.

Yours,
Laurenz Albe



pgsql-general by date:

Previous
From: "Zwettler Markus (OIZ)"
Date:
Subject: AW: AW: [Extern] Re: ICU database?
Next
From: Greg Sabino Mullane
Date:
Subject: Re: ICU database?