1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

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

Previously, the default encoding was derived from the locale when
using libc; while the default was always UTF-8 when using ICU. That
would throw an error when the locale was not compatible with UTF-8.

This commit causes initdb to derive the default encoding from the
locale for both providers. If --no-locale is specified (or if the
locale is C or POSIX), the default encoding will be UTF-8 for ICU
(because ICU does not support SQL_ASCII) and SQL_ASCII for libc.

Per buildfarm failure on system "hoverfly" related to commit
27b62377b4.

Discussion: https://postgr.es/m/d191d5841347301a8f1238f609471ddd957fc47e.camel%40j-davis.com
This commit is contained in:
Jeff Davis
2023-03-10 10:51:24 -08:00
parent 3e623ebc7a
commit c45dc7ffbb
6 changed files with 29 additions and 27 deletions

View File

@ -37,6 +37,6 @@ tests += {
'sql': [
'unaccent',
],
'regress_args': ['--encoding=UTF8'],
'regress_args': ['--encoding=UTF8', '--no-locale'],
},
}