aboutsummaryrefslogtreecommitdiff
path: root/src/include/common/unicode_norm.h
blob: 9a5e250bcf79cc961437ce3ab8514dd09a5df346 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*-------------------------------------------------------------------------
 *
 * unicode_norm.h
 *	  Routines for normalizing Unicode strings
 *
 * These definitions are used by both frontend and backend code.
 *
 * Copyright (c) 2017-2020, PostgreSQL Global Development Group
 *
 * src/include/common/unicode_norm.h
 *
 *-------------------------------------------------------------------------
 */
#ifndef UNICODE_NORM_H
#define UNICODE_NORM_H

#include "mb/pg_wchar.h"

typedef enum
{
	UNICODE_NFC = 0,
	UNICODE_NFD = 1,
	UNICODE_NFKC = 2,
	UNICODE_NFKD = 3,
} UnicodeNormalizationForm;

extern pg_wchar *unicode_normalize(UnicodeNormalizationForm form, const pg_wchar *input);

#endif							/* UNICODE_NORM_H */