Re: pgsql: Use ICU by default at initdb time.

Peter Eisentraut <peter.eisentraut@enterprisedb.com>

From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Jeff Davis <pgsql@j-davis.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-03-10T09:59:12Z
Lists: pgsql-hackers
On 10.03.23 03:26, Jeff Davis wrote:
> That's because ICU always uses UTF-8 by default. ICU works just fine
> with many other encodings; is there a reason it doesn't take it from
> the environment just like for provider=libc?

I think originally the locale forced the encoding.  With ICU, we have a 
choice.  We could either stick to the encoding suggested by the OS, or 
pick our own.

Arguably, if we are going to nudge toward ICU, maybe we should nudge 
toward UTF-8 as well.




Commits

  1. initdb: derive encoding from locale for ICU; similar to libc.

  2. Use ICU by default at initdb time.