Skip to content

Commit 9025af3

Browse files
committed
Fix the new SASLprep tests to work with non-UTF-8 locales.
Fix by forcing database encoding to UTF-8, regardless of the current locale. Pointed out by Tom Lane. Discussion: https://www.postgresql.org/message-id/8934.1491614631@sss.pgh.pa.us
1 parent f0e4402 commit 9025af3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/test/authentication/t/002_saslprep.pl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ sub test_login
4242
{
4343
skip "authentication tests cannot run on Windows", 12 if ($windows_os);
4444

45-
# Initialize master node
45+
# Initialize master node. Force UTF-8 encoding, so that we can use non-ASCII
46+
# characters in the passwords below.
4647
my $node = get_new_node('master');
47-
$node->init;
48+
$node->init(extra => ['--locale=C', '--encoding=UTF8']);
4849
$node->start;
4950

5051
# These tests are based on the example strings from RFC4013.txt,

0 commit comments

Comments
 (0)