mirror of
https://github.com/postgres/postgres.git
synced 2025-09-09 13:09:39 +03:00
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 <daniel@manitou-mail.org> Reviewed-by: Andreas Karlsson <andreas@proxel.se> Discussion: https://www.postgresql.org/message-id/flat/c1909f27-c269-2ed9-12f8-3ab72c8caf7a@2ndquadrant.com
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user