From d40d564c5a920e1121b28463dfed74441cbae5c0 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 24 Mar 2020 08:49:52 +0100 Subject: Add support for other normal forms to Unicode normalization API It previously only supported NFKC, for use by SASLprep. This expands the API to offer the choice of all four normalization forms. Right now, there are no internal users of the forms other than NFKC. Reviewed-by: Daniel Verite Reviewed-by: Andreas Karlsson Discussion: https://www.postgresql.org/message-id/flat/c1909f27-c269-2ed9-12f8-3ab72c8caf7a@2ndquadrant.com --- src/common/saslprep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common/saslprep.c') diff --git a/src/common/saslprep.c b/src/common/saslprep.c index 7739b81807e..2dedf6b0fb6 100644 --- a/src/common/saslprep.c +++ b/src/common/saslprep.c @@ -1156,7 +1156,7 @@ pg_saslprep(const char *input, char **output) * 2) Normalize -- Normalize the result of step 1 using Unicode * normalization. */ - output_chars = unicode_normalize_kc(input_chars); + output_chars = unicode_normalize(UNICODE_NFKC, input_chars); if (!output_chars) goto oom; -- cgit v1.2.3