EnterpriseDB / edb-installers

PostgreSQL installers packaged by EDB
33 stars 8 forks source link

initdb.exe with utf8 #156

Closed bjoernwuest closed 1 month ago

bjoernwuest commented 2 months ago

Version: 17rc1, ZIP-archive OS: Windows 11 (German)

Issued command: .\initdb.exe -D ../data --username=postgres --auth=trust --locale=en_US.UTF8 --pwprompt

Output:

The files belonging to this database system will be owned by user "...".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.UTF8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

Enter new superuser password:
Enter it again:

creating directory ../data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... windows
selecting default "max_connections" ... 100
selecting default "shared_buffers" ... 128MB
selecting default time zone ... Europe/Berlin
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... 2024-09-10 20:52:00.459 CEST [1980] FATAL:  invalid byte sequence for encoding "UTF8": 0xf6 0x72 0x6e 0x57
child process exited with exit code 1
initdb: removing data directory "../data"

When issuing the command without locale, it uses Win1252 and works absolutely fine.

sandeep-edb commented 2 months ago

This is not the installer issue. And seems expected if the directory path contains non-ASCII characters as per: https://www.postgresql.org/message-id/16926-e4ef345545d185ab%40postgresql.org