wxMaxima
Loading...
Searching...
No Matches
unicode_norm.h
1/*-------------------------------------------------------------------------
2 *
3 * unicode_norm.h
4 * Routines for normalizing Unicode strings
5 *
6 * These definitions are used by both frontend and backend code.
7 *
8 * Copyright (c) 2017-2023, PostgreSQL Global Development Group
9 *
10 * src/include/common/unicode_norm.h
11 *
12 *-------------------------------------------------------------------------
13 */
14
15#pragma once
16#ifndef WXPDFDOC_CRYPTO_UNICODE_NORM_H_
17#define WXPDFDOC_CRYPTO_UNICODE_NORM_H_
18
19namespace wxpdfdoc {
20namespace crypto {
21
22 /*
23 * lengthof
24 * Number of elements in an array.
25 */
26#define lengthof(array) (sizeof (array) / sizeof ((array)[0]))
27
28typedef unsigned int pg_wchar;
29
30typedef enum
31{
32 UNICODE_NFC = 0,
33 UNICODE_NFD = 1,
34 UNICODE_NFKC = 2,
35 UNICODE_NFKD = 3,
36} UnicodeNormalizationForm;
37
38/* see UAX #15 */
39typedef enum
40{
41 UNICODE_NORM_QC_NO = 0,
42 UNICODE_NORM_QC_YES = 1,
43 UNICODE_NORM_QC_MAYBE = -1,
44} UnicodeNormalizationQC;
45
46pg_wchar* unicode_normalize(UnicodeNormalizationForm form, const pg_wchar* input);
47
48} // namespace crypto
49} // namespace wxpdfdoc
50
51#endif // WXPDFDOC_CRYPTO_UNICODE_NORM_H_