From 58e335f3dc9788f5e82d136526adf28b707f2724 Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Sun, 11 Jan 2026 15:38:10 +0100 Subject: [PATCH] postgresqlTestHook: explicitly set encoding to UTF8 Otherwise it appears to default to ASCII, causing issues with the tests from libpqxx. It may also affect other use cases where unicode/utf8 characters are used in tests. Related to https://github.com/NixOS/nixpkgs/pull/476936 where the tests are enabled and the issues with the encoding have popped up. --- pkgs/by-name/po/postgresqlTestHook/postgresql-test-hook.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/po/postgresqlTestHook/postgresql-test-hook.sh b/pkgs/by-name/po/postgresqlTestHook/postgresql-test-hook.sh index 41762121882b..f36a384b6fb4 100644 --- a/pkgs/by-name/po/postgresqlTestHook/postgresql-test-hook.sh +++ b/pkgs/by-name/po/postgresqlTestHook/postgresql-test-hook.sh @@ -54,7 +54,7 @@ EOF false fi echo 'initializing postgresql' - initdb -U postgres + initdb --encoding=UTF8 -U postgres echo "$postgresqlExtraSettings" >>"$PGDATA/postgresql.conf"