1 /* Unicode character classification and properties.
2 Copyright (C) 2002, 2005-2024 Free Software Foundation, Inc.
4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as
6 published by the Free Software Foundation; either version 2.1 of the
7 License, or (at your option) any later version.
9 This file is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program. If not, see <https://www.gnu.org/licenses/>. */
28 #if @HAVE_UNISTRING_WOE32DLL_H@
29 # include <unistring/woe32dll.h>
31 # define LIBUNISTRING_DLL_VARIABLE
38 /* ========================================================================= */
40 /* Field 1 of Unicode Character Database: Character name.
43 /* ========================================================================= */
45 /* Field 2 of Unicode Character Database: General category. */
47 /* Data type denoting a General category value. This is not just a bitmask,
48 but rather a bitmask and a pointer to the lookup table, so that programs
49 that use only the predefined bitmasks (i.e. don't combine bitmasks with &
50 and |) don't have a link-time dependency towards the big general table. */
53 uint32_t bitmask
: 31;
54 /*bool*/ unsigned int generic
: 1;
57 const void *table
; /* when generic is 0 */
58 bool (*lookup_fn
) (ucs4_t uc
, uint32_t bitmask
); /* when generic is 1 */
61 uc_general_category_t
;
63 /* Bits and bit masks denoting General category values. UnicodeData-3.2.0.html
64 says a 32-bit integer will always suffice to represent them.
65 These bit masks can only be used with the uc_is_general_category_withtable
69 UC_CATEGORY_MASK_L
= 0x0000001f,
70 UC_CATEGORY_MASK_LC
= 0x00000007,
71 UC_CATEGORY_MASK_Lu
= 0x00000001,
72 UC_CATEGORY_MASK_Ll
= 0x00000002,
73 UC_CATEGORY_MASK_Lt
= 0x00000004,
74 UC_CATEGORY_MASK_Lm
= 0x00000008,
75 UC_CATEGORY_MASK_Lo
= 0x00000010,
76 UC_CATEGORY_MASK_M
= 0x000000e0,
77 UC_CATEGORY_MASK_Mn
= 0x00000020,
78 UC_CATEGORY_MASK_Mc
= 0x00000040,
79 UC_CATEGORY_MASK_Me
= 0x00000080,
80 UC_CATEGORY_MASK_N
= 0x00000700,
81 UC_CATEGORY_MASK_Nd
= 0x00000100,
82 UC_CATEGORY_MASK_Nl
= 0x00000200,
83 UC_CATEGORY_MASK_No
= 0x00000400,
84 UC_CATEGORY_MASK_P
= 0x0003f800,
85 UC_CATEGORY_MASK_Pc
= 0x00000800,
86 UC_CATEGORY_MASK_Pd
= 0x00001000,
87 UC_CATEGORY_MASK_Ps
= 0x00002000,
88 UC_CATEGORY_MASK_Pe
= 0x00004000,
89 UC_CATEGORY_MASK_Pi
= 0x00008000,
90 UC_CATEGORY_MASK_Pf
= 0x00010000,
91 UC_CATEGORY_MASK_Po
= 0x00020000,
92 UC_CATEGORY_MASK_S
= 0x003c0000,
93 UC_CATEGORY_MASK_Sm
= 0x00040000,
94 UC_CATEGORY_MASK_Sc
= 0x00080000,
95 UC_CATEGORY_MASK_Sk
= 0x00100000,
96 UC_CATEGORY_MASK_So
= 0x00200000,
97 UC_CATEGORY_MASK_Z
= 0x01c00000,
98 UC_CATEGORY_MASK_Zs
= 0x00400000,
99 UC_CATEGORY_MASK_Zl
= 0x00800000,
100 UC_CATEGORY_MASK_Zp
= 0x01000000,
101 UC_CATEGORY_MASK_C
= 0x3e000000,
102 UC_CATEGORY_MASK_Cc
= 0x02000000,
103 UC_CATEGORY_MASK_Cf
= 0x04000000,
104 UC_CATEGORY_MASK_Cs
= 0x08000000,
105 UC_CATEGORY_MASK_Co
= 0x10000000,
106 UC_CATEGORY_MASK_Cn
= 0x20000000
109 /* Predefined General category values. */
110 extern @GNULIB_UNICTYPE_CATEGORY_L_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_L
;
111 extern @GNULIB_UNICTYPE_CATEGORY_LC_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_LC
;
112 extern @GNULIB_UNICTYPE_CATEGORY_LU_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Lu
;
113 extern @GNULIB_UNICTYPE_CATEGORY_LL_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Ll
;
114 extern @GNULIB_UNICTYPE_CATEGORY_LT_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Lt
;
115 extern @GNULIB_UNICTYPE_CATEGORY_LM_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Lm
;
116 extern @GNULIB_UNICTYPE_CATEGORY_LO_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Lo
;
117 extern @GNULIB_UNICTYPE_CATEGORY_M_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_M
;
118 extern @GNULIB_UNICTYPE_CATEGORY_MN_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Mn
;
119 extern @GNULIB_UNICTYPE_CATEGORY_MC_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Mc
;
120 extern @GNULIB_UNICTYPE_CATEGORY_ME_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Me
;
121 extern @GNULIB_UNICTYPE_CATEGORY_N_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_N
;
122 extern @GNULIB_UNICTYPE_CATEGORY_ND_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Nd
;
123 extern @GNULIB_UNICTYPE_CATEGORY_NL_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Nl
;
124 extern @GNULIB_UNICTYPE_CATEGORY_NO_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_No
;
125 extern @GNULIB_UNICTYPE_CATEGORY_P_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_P
;
126 extern @GNULIB_UNICTYPE_CATEGORY_PC_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Pc
;
127 extern @GNULIB_UNICTYPE_CATEGORY_PD_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Pd
;
128 extern @GNULIB_UNICTYPE_CATEGORY_PS_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Ps
;
129 extern @GNULIB_UNICTYPE_CATEGORY_PE_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Pe
;
130 extern @GNULIB_UNICTYPE_CATEGORY_PI_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Pi
;
131 extern @GNULIB_UNICTYPE_CATEGORY_PF_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Pf
;
132 extern @GNULIB_UNICTYPE_CATEGORY_PO_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Po
;
133 extern @GNULIB_UNICTYPE_CATEGORY_S_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_S
;
134 extern @GNULIB_UNICTYPE_CATEGORY_SM_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Sm
;
135 extern @GNULIB_UNICTYPE_CATEGORY_SC_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Sc
;
136 extern @GNULIB_UNICTYPE_CATEGORY_SK_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Sk
;
137 extern @GNULIB_UNICTYPE_CATEGORY_SO_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_So
;
138 extern @GNULIB_UNICTYPE_CATEGORY_Z_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Z
;
139 extern @GNULIB_UNICTYPE_CATEGORY_ZS_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Zs
;
140 extern @GNULIB_UNICTYPE_CATEGORY_ZL_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Zl
;
141 extern @GNULIB_UNICTYPE_CATEGORY_ZP_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Zp
;
142 extern @GNULIB_UNICTYPE_CATEGORY_C_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_C
;
143 extern @GNULIB_UNICTYPE_CATEGORY_CC_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Cc
;
144 extern @GNULIB_UNICTYPE_CATEGORY_CF_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Cf
;
145 extern @GNULIB_UNICTYPE_CATEGORY_CS_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Cs
;
146 extern @GNULIB_UNICTYPE_CATEGORY_CO_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Co
;
147 extern @GNULIB_UNICTYPE_CATEGORY_CN_DLL_VARIABLE@
const uc_general_category_t UC_CATEGORY_Cn
;
149 extern const uc_general_category_t _UC_CATEGORY_NONE
;
151 /* Alias names for predefined General category values. */
152 #define UC_LETTER UC_CATEGORY_L
153 #define UC_CASED_LETTER UC_CATEGORY_LC
154 #define UC_UPPERCASE_LETTER UC_CATEGORY_Lu
155 #define UC_LOWERCASE_LETTER UC_CATEGORY_Ll
156 #define UC_TITLECASE_LETTER UC_CATEGORY_Lt
157 #define UC_MODIFIER_LETTER UC_CATEGORY_Lm
158 #define UC_OTHER_LETTER UC_CATEGORY_Lo
159 #define UC_MARK UC_CATEGORY_M
160 #define UC_NON_SPACING_MARK UC_CATEGORY_Mn
161 #define UC_COMBINING_SPACING_MARK UC_CATEGORY_Mc
162 #define UC_ENCLOSING_MARK UC_CATEGORY_Me
163 #define UC_NUMBER UC_CATEGORY_N
164 #define UC_DECIMAL_DIGIT_NUMBER UC_CATEGORY_Nd
165 #define UC_LETTER_NUMBER UC_CATEGORY_Nl
166 #define UC_OTHER_NUMBER UC_CATEGORY_No
167 #define UC_PUNCTUATION UC_CATEGORY_P
168 #define UC_CONNECTOR_PUNCTUATION UC_CATEGORY_Pc
169 #define UC_DASH_PUNCTUATION UC_CATEGORY_Pd
170 #define UC_OPEN_PUNCTUATION UC_CATEGORY_Ps /* a.k.a. UC_START_PUNCTUATION */
171 #define UC_CLOSE_PUNCTUATION UC_CATEGORY_Pe /* a.k.a. UC_END_PUNCTUATION */
172 #define UC_INITIAL_QUOTE_PUNCTUATION UC_CATEGORY_Pi
173 #define UC_FINAL_QUOTE_PUNCTUATION UC_CATEGORY_Pf
174 #define UC_OTHER_PUNCTUATION UC_CATEGORY_Po
175 #define UC_SYMBOL UC_CATEGORY_S
176 #define UC_MATH_SYMBOL UC_CATEGORY_Sm
177 #define UC_CURRENCY_SYMBOL UC_CATEGORY_Sc
178 #define UC_MODIFIER_SYMBOL UC_CATEGORY_Sk
179 #define UC_OTHER_SYMBOL UC_CATEGORY_So
180 #define UC_SEPARATOR UC_CATEGORY_Z
181 #define UC_SPACE_SEPARATOR UC_CATEGORY_Zs
182 #define UC_LINE_SEPARATOR UC_CATEGORY_Zl
183 #define UC_PARAGRAPH_SEPARATOR UC_CATEGORY_Zp
184 #define UC_OTHER UC_CATEGORY_C
185 #define UC_CONTROL UC_CATEGORY_Cc
186 #define UC_FORMAT UC_CATEGORY_Cf
187 #define UC_SURROGATE UC_CATEGORY_Cs /* all of them are invalid characters */
188 #define UC_PRIVATE_USE UC_CATEGORY_Co
189 #define UC_UNASSIGNED UC_CATEGORY_Cn /* some of them are invalid characters */
191 /* Return the union of two general categories.
192 This corresponds to the unions of the two sets of characters. */
193 extern uc_general_category_t
194 uc_general_category_or (uc_general_category_t category1
,
195 uc_general_category_t category2
);
197 /* Return the intersection of two general categories as bit masks.
198 This *does*not* correspond to the intersection of the two sets of
200 extern uc_general_category_t
201 uc_general_category_and (uc_general_category_t category1
,
202 uc_general_category_t category2
);
204 /* Return the intersection of a general category with the complement of a
205 second general category, as bit masks.
206 This *does*not* correspond to the intersection with complement, when
207 viewing the categories as sets of characters. */
208 extern uc_general_category_t
209 uc_general_category_and_not (uc_general_category_t category1
,
210 uc_general_category_t category2
);
212 /* Return the name of a general category. */
214 uc_general_category_name (uc_general_category_t category
)
217 /* Return the long name of a general category. */
219 uc_general_category_long_name (uc_general_category_t category
)
222 /* Return the general category given by name, e.g. "Lu", or by long name,
223 e.g. "Uppercase Letter". */
224 extern uc_general_category_t
225 uc_general_category_byname (const char *category_name
)
228 /* Return the general category of a Unicode character. */
229 extern uc_general_category_t
230 uc_general_category (ucs4_t uc
)
233 /* Test whether a Unicode character belongs to a given category.
234 The CATEGORY argument can be the combination of several predefined
235 general categories. */
237 uc_is_general_category (ucs4_t uc
, uc_general_category_t category
)
239 /* Likewise. This function uses a big table comprising all categories. */
241 uc_is_general_category_withtable (ucs4_t uc
, uint32_t bitmask
)
244 /* ========================================================================= */
246 /* Field 3 of Unicode Character Database: Canonical combining class. */
248 /* The possible results of uc_combining_class (0..255) are described in
249 UCD.html. The list here is not definitive; more values can be added
250 in future versions. */
253 UC_CCC_NR
= 0, /* Not Reordered */
254 UC_CCC_OV
= 1, /* Overlay */
255 UC_CCC_NK
= 7, /* Nukta */
256 UC_CCC_KV
= 8, /* Kana Voicing */
257 UC_CCC_VR
= 9, /* Virama */
258 UC_CCC_ATBL
= 200, /* Attached Below Left */
259 UC_CCC_ATB
= 202, /* Attached Below */
260 UC_CCC_ATA
= 214, /* Attached Above */
261 UC_CCC_ATAR
= 216, /* Attached Above Right */
262 UC_CCC_BL
= 218, /* Below Left */
263 UC_CCC_B
= 220, /* Below */
264 UC_CCC_BR
= 222, /* Below Right */
265 UC_CCC_L
= 224, /* Left */
266 UC_CCC_R
= 226, /* Right */
267 UC_CCC_AL
= 228, /* Above Left */
268 UC_CCC_A
= 230, /* Above */
269 UC_CCC_AR
= 232, /* Above Right */
270 UC_CCC_DB
= 233, /* Double Below */
271 UC_CCC_DA
= 234, /* Double Above */
272 UC_CCC_IS
= 240 /* Iota Subscript */
275 /* Return the canonical combining class of a Unicode character. */
277 uc_combining_class (ucs4_t uc
)
280 /* Return the name of a canonical combining class. */
282 uc_combining_class_name (int ccc
)
285 /* Return the long name of a canonical combining class. */
287 uc_combining_class_long_name (int ccc
)
290 /* Return the canonical combining class given by name, e.g. "BL", or by long
291 name, e.g. "Below Left". */
293 uc_combining_class_byname (const char *ccc_name
)
296 /* ========================================================================= */
298 /* Field 4 of Unicode Character Database: Bidi class.
299 Before Unicode 4.0, this field was called "Bidirectional category". */
303 UC_BIDI_L
, /* Left-to-Right */
304 UC_BIDI_LRE
, /* Left-to-Right Embedding */
305 UC_BIDI_LRO
, /* Left-to-Right Override */
306 UC_BIDI_R
, /* Right-to-Left */
307 UC_BIDI_AL
, /* Right-to-Left Arabic */
308 UC_BIDI_RLE
, /* Right-to-Left Embedding */
309 UC_BIDI_RLO
, /* Right-to-Left Override */
310 UC_BIDI_PDF
, /* Pop Directional Format */
311 UC_BIDI_EN
, /* European Number */
312 UC_BIDI_ES
, /* European Number Separator */
313 UC_BIDI_ET
, /* European Number Terminator */
314 UC_BIDI_AN
, /* Arabic Number */
315 UC_BIDI_CS
, /* Common Number Separator */
316 UC_BIDI_NSM
, /* Non-Spacing Mark */
317 UC_BIDI_BN
, /* Boundary Neutral */
318 UC_BIDI_B
, /* Paragraph Separator */
319 UC_BIDI_S
, /* Segment Separator */
320 UC_BIDI_WS
, /* Whitespace */
321 UC_BIDI_ON
, /* Other Neutral */
322 UC_BIDI_LRI
, /* Left-to-Right Isolate */
323 UC_BIDI_RLI
, /* Right-to-Left Isolate */
324 UC_BIDI_FSI
, /* First Strong Isolate */
325 UC_BIDI_PDI
/* Pop Directional Isolate */
328 /* Return the name of a bidi class. */
330 uc_bidi_class_name (int bidi_class
)
332 /* Same; obsolete function name. */
334 uc_bidi_category_name (int category
)
337 /* Return the long name of a bidi class. */
339 uc_bidi_class_long_name (int bidi_class
)
342 /* Return the bidi class given by name, e.g. "LRE", or by long name, e.g.
343 "Left-to-Right Embedding". */
345 uc_bidi_class_byname (const char *bidi_class_name
)
347 /* Same; obsolete function name. */
349 uc_bidi_category_byname (const char *category_name
)
352 /* Return the bidi class of a Unicode character. */
354 uc_bidi_class (ucs4_t uc
)
356 /* Same; obsolete function name. */
358 uc_bidi_category (ucs4_t uc
)
361 /* Test whether a Unicode character belongs to a given bidi class. */
363 uc_is_bidi_class (ucs4_t uc
, int bidi_class
)
365 /* Same; obsolete function name. */
367 uc_is_bidi_category (ucs4_t uc
, int category
)
370 /* ========================================================================= */
372 /* Field 5 of Unicode Character Database: Character decomposition mapping.
375 /* ========================================================================= */
377 /* Field 6 of Unicode Character Database: Decimal digit value. */
379 /* Return the decimal digit value of a Unicode character. */
381 uc_decimal_value (ucs4_t uc
)
384 /* ========================================================================= */
386 /* Field 7 of Unicode Character Database: Digit value. */
388 /* Return the digit value of a Unicode character. */
390 uc_digit_value (ucs4_t uc
)
393 /* ========================================================================= */
395 /* Field 8 of Unicode Character Database: Numeric value. */
397 /* Return the numeric value of a Unicode character. */
405 uc_numeric_value (ucs4_t uc
)
408 /* ========================================================================= */
410 /* Field 9 of Unicode Character Database: Mirrored. */
412 /* Return the mirrored character of a Unicode character UC in *PUC. */
414 uc_mirror_char (ucs4_t uc
, ucs4_t
*puc
);
416 /* ========================================================================= */
418 /* Field 10 of Unicode Character Database: Unicode 1.0 Name.
419 Not available in this library. */
421 /* ========================================================================= */
423 /* Field 11 of Unicode Character Database: ISO 10646 comment.
424 Not available in this library. */
426 /* ========================================================================= */
428 /* Field 12, 13, 14 of Unicode Character Database: Uppercase mapping,
429 lowercase mapping, titlecase mapping. See "unicase.h". */
431 /* ========================================================================= */
433 /* Field 2 of the file ArabicShaping.txt in the Unicode Character Database. */
435 /* Possible joining types. */
438 UC_JOINING_TYPE_U
, /* Non_Joining */
439 UC_JOINING_TYPE_T
, /* Transparent */
440 UC_JOINING_TYPE_C
, /* Join_Causing */
441 UC_JOINING_TYPE_L
, /* Left_Joining */
442 UC_JOINING_TYPE_R
, /* Right_Joining */
443 UC_JOINING_TYPE_D
/* Dual_Joining */
446 /* Return the name of a joining type. */
448 uc_joining_type_name (int joining_type
)
451 /* Return the long name of a joining type. */
453 uc_joining_type_long_name (int joining_type
)
456 /* Return the joining type given by name, e.g. "D", or by long name, e.g.
459 uc_joining_type_byname (const char *joining_type_name
)
462 /* Return the joining type of a Unicode character. */
464 uc_joining_type (ucs4_t uc
)
467 /* ========================================================================= */
469 /* Field 3 of the file ArabicShaping.txt in the Unicode Character Database. */
471 /* Possible joining groups.
472 This enumeration may be extended in the future. */
475 UC_JOINING_GROUP_NONE
, /* No_Joining_Group */
476 UC_JOINING_GROUP_AIN
, /* Ain */
477 UC_JOINING_GROUP_ALAPH
, /* Alaph */
478 UC_JOINING_GROUP_ALEF
, /* Alef */
479 UC_JOINING_GROUP_BEH
, /* Beh */
480 UC_JOINING_GROUP_BETH
, /* Beth */
481 UC_JOINING_GROUP_BURUSHASKI_YEH_BARREE
, /* Burushaski_Yeh_Barree */
482 UC_JOINING_GROUP_DAL
, /* Dal */
483 UC_JOINING_GROUP_DALATH_RISH
, /* Dalath_Rish */
484 UC_JOINING_GROUP_E
, /* E */
485 UC_JOINING_GROUP_FARSI_YEH
, /* Farsi_Yeh */
486 UC_JOINING_GROUP_FE
, /* Fe */
487 UC_JOINING_GROUP_FEH
, /* Feh */
488 UC_JOINING_GROUP_FINAL_SEMKATH
, /* Final_Semkath */
489 UC_JOINING_GROUP_GAF
, /* Gaf */
490 UC_JOINING_GROUP_GAMAL
, /* Gamal */
491 UC_JOINING_GROUP_HAH
, /* Hah */
492 UC_JOINING_GROUP_HE
, /* He */
493 UC_JOINING_GROUP_HEH
, /* Heh */
494 UC_JOINING_GROUP_HEH_GOAL
, /* Heh_Goal */
495 UC_JOINING_GROUP_HETH
, /* Heth */
496 UC_JOINING_GROUP_KAF
, /* Kaf */
497 UC_JOINING_GROUP_KAPH
, /* Kaph */
498 UC_JOINING_GROUP_KHAPH
, /* Khaph */
499 UC_JOINING_GROUP_KNOTTED_HEH
, /* Knotted_Heh */
500 UC_JOINING_GROUP_LAM
, /* Lam */
501 UC_JOINING_GROUP_LAMADH
, /* Lamadh */
502 UC_JOINING_GROUP_MEEM
, /* Meem */
503 UC_JOINING_GROUP_MIM
, /* Mim */
504 UC_JOINING_GROUP_NOON
, /* Noon */
505 UC_JOINING_GROUP_NUN
, /* Nun */
506 UC_JOINING_GROUP_NYA
, /* Nya */
507 UC_JOINING_GROUP_PE
, /* Pe */
508 UC_JOINING_GROUP_QAF
, /* Qaf */
509 UC_JOINING_GROUP_QAPH
, /* Qaph */
510 UC_JOINING_GROUP_REH
, /* Reh */
511 UC_JOINING_GROUP_REVERSED_PE
, /* Reversed_Pe */
512 UC_JOINING_GROUP_SAD
, /* Sad */
513 UC_JOINING_GROUP_SADHE
, /* Sadhe */
514 UC_JOINING_GROUP_SEEN
, /* Seen */
515 UC_JOINING_GROUP_SEMKATH
, /* Semkath */
516 UC_JOINING_GROUP_SHIN
, /* Shin */
517 UC_JOINING_GROUP_SWASH_KAF
, /* Swash_Kaf */
518 UC_JOINING_GROUP_SYRIAC_WAW
, /* Syriac_Waw */
519 UC_JOINING_GROUP_TAH
, /* Tah */
520 UC_JOINING_GROUP_TAW
, /* Taw */
521 UC_JOINING_GROUP_TEH_MARBUTA
, /* Teh_Marbuta */
522 UC_JOINING_GROUP_TEH_MARBUTA_GOAL
, /* Teh_Marbuta_Goal */
523 UC_JOINING_GROUP_TETH
, /* Teth */
524 UC_JOINING_GROUP_WAW
, /* Waw */
525 UC_JOINING_GROUP_YEH
, /* Yeh */
526 UC_JOINING_GROUP_YEH_BARREE
, /* Yeh_Barree */
527 UC_JOINING_GROUP_YEH_WITH_TAIL
, /* Yeh_With_Tail */
528 UC_JOINING_GROUP_YUDH
, /* Yudh */
529 UC_JOINING_GROUP_YUDH_HE
, /* Yudh_He */
530 UC_JOINING_GROUP_ZAIN
, /* Zain */
531 UC_JOINING_GROUP_ZHAIN
, /* Zhain */
532 UC_JOINING_GROUP_ROHINGYA_YEH
, /* Rohingya_Yeh */
533 UC_JOINING_GROUP_STRAIGHT_WAW
, /* Straight_Waw */
534 UC_JOINING_GROUP_MANICHAEAN_ALEPH
, /* Manichaean_Aleph */
535 UC_JOINING_GROUP_MANICHAEAN_BETH
, /* Manichaean_Beth */
536 UC_JOINING_GROUP_MANICHAEAN_GIMEL
, /* Manichaean_Gimel */
537 UC_JOINING_GROUP_MANICHAEAN_DALETH
, /* Manichaean_Daleth */
538 UC_JOINING_GROUP_MANICHAEAN_WAW
, /* Manichaean_Waw */
539 UC_JOINING_GROUP_MANICHAEAN_ZAYIN
, /* Manichaean_Zayin */
540 UC_JOINING_GROUP_MANICHAEAN_HETH
, /* Manichaean_Heth */
541 UC_JOINING_GROUP_MANICHAEAN_TETH
, /* Manichaean_Teth */
542 UC_JOINING_GROUP_MANICHAEAN_YODH
, /* Manichaean_Yodh */
543 UC_JOINING_GROUP_MANICHAEAN_KAPH
, /* Manichaean_Kaph */
544 UC_JOINING_GROUP_MANICHAEAN_LAMEDH
, /* Manichaean_Lamedh */
545 UC_JOINING_GROUP_MANICHAEAN_DHAMEDH
, /* Manichaean_Dhamedh */
546 UC_JOINING_GROUP_MANICHAEAN_THAMEDH
, /* Manichaean_Thamedh */
547 UC_JOINING_GROUP_MANICHAEAN_MEM
, /* Manichaean_Mem */
548 UC_JOINING_GROUP_MANICHAEAN_NUN
, /* Manichaean_Nun */
549 UC_JOINING_GROUP_MANICHAEAN_SAMEKH
, /* Manichaean_Aleph */
550 UC_JOINING_GROUP_MANICHAEAN_AYIN
, /* Manichaean_Ayin */
551 UC_JOINING_GROUP_MANICHAEAN_PE
, /* Manichaean_Pe */
552 UC_JOINING_GROUP_MANICHAEAN_SADHE
, /* Manichaean_Sadhe */
553 UC_JOINING_GROUP_MANICHAEAN_QOPH
, /* Manichaean_Qoph */
554 UC_JOINING_GROUP_MANICHAEAN_RESH
, /* Manichaean_Resh */
555 UC_JOINING_GROUP_MANICHAEAN_TAW
, /* Manichaean_Taw */
556 UC_JOINING_GROUP_MANICHAEAN_ONE
, /* Manichaean_One */
557 UC_JOINING_GROUP_MANICHAEAN_FIVE
, /* Manichaean_Five */
558 UC_JOINING_GROUP_MANICHAEAN_TEN
, /* Manichaean_Ten */
559 UC_JOINING_GROUP_MANICHAEAN_TWENTY
, /* Manichaean_Twenty */
560 UC_JOINING_GROUP_MANICHAEAN_HUNDRED
, /* Manichaean_Hundred */
561 UC_JOINING_GROUP_AFRICAN_FEH
, /* African_Feh */
562 UC_JOINING_GROUP_AFRICAN_QAF
, /* African_Qaf */
563 UC_JOINING_GROUP_AFRICAN_NOON
, /* African_Noon */
564 UC_JOINING_GROUP_MALAYALAM_NGA
, /* Malayalam_Nga */
565 UC_JOINING_GROUP_MALAYALAM_JA
, /* Malayalam_Ja */
566 UC_JOINING_GROUP_MALAYALAM_NYA
, /* Malayalam_Nya */
567 UC_JOINING_GROUP_MALAYALAM_TTA
, /* Malayalam_Tta */
568 UC_JOINING_GROUP_MALAYALAM_NNA
, /* Malayalam_Nna */
569 UC_JOINING_GROUP_MALAYALAM_NNNA
, /* Malayalam_Nnna */
570 UC_JOINING_GROUP_MALAYALAM_BHA
, /* Malayalam_Bha */
571 UC_JOINING_GROUP_MALAYALAM_RA
, /* Malayalam_Ra */
572 UC_JOINING_GROUP_MALAYALAM_LLA
, /* Malayalam_Lla */
573 UC_JOINING_GROUP_MALAYALAM_LLLA
, /* Malayalam_Llla */
574 UC_JOINING_GROUP_MALAYALAM_SSA
, /* Malayalam_Ssa */
575 UC_JOINING_GROUP_HANIFI_ROHINGYA_PA
, /* Hanifi_Rohingya_Pa */
576 UC_JOINING_GROUP_HANIFI_ROHINGYA_KINNA_YA
, /* Hanifi_Rohingya_Kinna_Ya */
577 UC_JOINING_GROUP_THIN_YEH
, /* Thin_Yeh */
578 UC_JOINING_GROUP_VERTICAL_TAIL
, /* Vertical_Tail */
579 UC_JOINING_GROUP_KASHMIRI_YEH
/* Kashmiri_Yeh */
582 /* Return the name of a joining group. */
584 uc_joining_group_name (int joining_group
)
587 /* Return the joining group given by name, e.g. "Teh_Marbuta". */
589 uc_joining_group_byname (const char *joining_group_name
)
592 /* Return the joining group of a Unicode character. */
594 uc_joining_group (ucs4_t uc
)
597 /* ========================================================================= */
599 /* Common API for properties. */
601 /* Data type denoting a property. This is not just a number, but rather a
602 pointer to the test functions, so that programs that use only few of the
603 properties don't have a link-time dependency towards all the tables. */
606 bool (*test_fn
) (ucs4_t uc
);
610 /* Predefined properties. */
612 extern @GNULIB_UNICTYPE_PROPERTY_WHITE_SPACE_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_WHITE_SPACE
;
613 extern @GNULIB_UNICTYPE_PROPERTY_ALPHABETIC_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_ALPHABETIC
;
614 extern @GNULIB_UNICTYPE_PROPERTY_OTHER_ALPHABETIC_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_OTHER_ALPHABETIC
;
615 extern @GNULIB_UNICTYPE_PROPERTY_NOT_A_CHARACTER_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_NOT_A_CHARACTER
;
616 extern @GNULIB_UNICTYPE_PROPERTY_DEFAULT_IGNORABLE_CODE_POINT_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_DEFAULT_IGNORABLE_CODE_POINT
;
617 extern @GNULIB_UNICTYPE_PROPERTY_OTHER_DEFAULT_IGNORABLE_CODE_POINT_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_OTHER_DEFAULT_IGNORABLE_CODE_POINT
;
618 extern @GNULIB_UNICTYPE_PROPERTY_DEPRECATED_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_DEPRECATED
;
619 extern @GNULIB_UNICTYPE_PROPERTY_LOGICAL_ORDER_EXCEPTION_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_LOGICAL_ORDER_EXCEPTION
;
620 extern @GNULIB_UNICTYPE_PROPERTY_VARIATION_SELECTOR_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_VARIATION_SELECTOR
;
621 extern @GNULIB_UNICTYPE_PROPERTY_PRIVATE_USE_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_PRIVATE_USE
;
622 extern @GNULIB_UNICTYPE_PROPERTY_UNASSIGNED_CODE_VALUE_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_UNASSIGNED_CODE_VALUE
;
624 extern @GNULIB_UNICTYPE_PROPERTY_UPPERCASE_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_UPPERCASE
;
625 extern @GNULIB_UNICTYPE_PROPERTY_OTHER_UPPERCASE_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_OTHER_UPPERCASE
;
626 extern @GNULIB_UNICTYPE_PROPERTY_LOWERCASE_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_LOWERCASE
;
627 extern @GNULIB_UNICTYPE_PROPERTY_OTHER_LOWERCASE_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_OTHER_LOWERCASE
;
628 extern @GNULIB_UNICTYPE_PROPERTY_TITLECASE_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_TITLECASE
;
629 extern @GNULIB_UNICTYPE_PROPERTY_CASED_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_CASED
;
630 extern @GNULIB_UNICTYPE_PROPERTY_CASE_IGNORABLE_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_CASE_IGNORABLE
;
631 extern @GNULIB_UNICTYPE_PROPERTY_CHANGES_WHEN_LOWERCASED_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_CHANGES_WHEN_LOWERCASED
;
632 extern @GNULIB_UNICTYPE_PROPERTY_CHANGES_WHEN_UPPERCASED_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_CHANGES_WHEN_UPPERCASED
;
633 extern @GNULIB_UNICTYPE_PROPERTY_CHANGES_WHEN_TITLECASED_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_CHANGES_WHEN_TITLECASED
;
634 extern @GNULIB_UNICTYPE_PROPERTY_CHANGES_WHEN_CASEFOLDED_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_CHANGES_WHEN_CASEFOLDED
;
635 extern @GNULIB_UNICTYPE_PROPERTY_CHANGES_WHEN_CASEMAPPED_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_CHANGES_WHEN_CASEMAPPED
;
636 extern @GNULIB_UNICTYPE_PROPERTY_SOFT_DOTTED_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_SOFT_DOTTED
;
638 extern @GNULIB_UNICTYPE_PROPERTY_ID_START_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_ID_START
;
639 extern @GNULIB_UNICTYPE_PROPERTY_OTHER_ID_START_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_OTHER_ID_START
;
640 extern @GNULIB_UNICTYPE_PROPERTY_ID_CONTINUE_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_ID_CONTINUE
;
641 extern @GNULIB_UNICTYPE_PROPERTY_OTHER_ID_CONTINUE_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_OTHER_ID_CONTINUE
;
642 extern @GNULIB_UNICTYPE_PROPERTY_XID_START_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_XID_START
;
643 extern @GNULIB_UNICTYPE_PROPERTY_XID_CONTINUE_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_XID_CONTINUE
;
644 extern @GNULIB_UNICTYPE_PROPERTY_ID_COMPAT_MATH_START_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_ID_COMPAT_MATH_START
;
645 extern @GNULIB_UNICTYPE_PROPERTY_ID_COMPAT_MATH_CONTINUE_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_ID_COMPAT_MATH_CONTINUE
;
646 extern @GNULIB_UNICTYPE_PROPERTY_PATTERN_WHITE_SPACE_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_PATTERN_WHITE_SPACE
;
647 extern @GNULIB_UNICTYPE_PROPERTY_PATTERN_SYNTAX_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_PATTERN_SYNTAX
;
648 /* Shaping and rendering. */
649 extern @GNULIB_UNICTYPE_PROPERTY_JOIN_CONTROL_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_JOIN_CONTROL
;
650 extern @GNULIB_UNICTYPE_PROPERTY_GRAPHEME_BASE_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_GRAPHEME_BASE
;
651 extern @GNULIB_UNICTYPE_PROPERTY_GRAPHEME_EXTEND_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_GRAPHEME_EXTEND
;
652 extern @GNULIB_UNICTYPE_PROPERTY_OTHER_GRAPHEME_EXTEND_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_OTHER_GRAPHEME_EXTEND
;
653 extern @GNULIB_UNICTYPE_PROPERTY_GRAPHEME_LINK_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_GRAPHEME_LINK
;
654 extern @GNULIB_UNICTYPE_PROPERTY_MODIFIER_COMBINING_MARK_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_MODIFIER_COMBINING_MARK
;
656 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_CONTROL_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_BIDI_CONTROL
;
657 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_LEFT_TO_RIGHT_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_BIDI_LEFT_TO_RIGHT
;
658 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_HEBREW_RIGHT_TO_LEFT_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_BIDI_HEBREW_RIGHT_TO_LEFT
;
659 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_ARABIC_RIGHT_TO_LEFT_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_BIDI_ARABIC_RIGHT_TO_LEFT
;
660 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_EUROPEAN_DIGIT_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_BIDI_EUROPEAN_DIGIT
;
661 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_EUR_NUM_SEPARATOR_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_BIDI_EUR_NUM_SEPARATOR
;
662 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_EUR_NUM_TERMINATOR_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_BIDI_EUR_NUM_TERMINATOR
;
663 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_ARABIC_DIGIT_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_BIDI_ARABIC_DIGIT
;
664 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_COMMON_SEPARATOR_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_BIDI_COMMON_SEPARATOR
;
665 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_BLOCK_SEPARATOR_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_BIDI_BLOCK_SEPARATOR
;
666 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_SEGMENT_SEPARATOR_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_BIDI_SEGMENT_SEPARATOR
;
667 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_WHITESPACE_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_BIDI_WHITESPACE
;
668 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_NON_SPACING_MARK_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_BIDI_NON_SPACING_MARK
;
669 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_BOUNDARY_NEUTRAL_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_BIDI_BOUNDARY_NEUTRAL
;
670 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_PDF_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_BIDI_PDF
;
671 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_EMBEDDING_OR_OVERRIDE_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_BIDI_EMBEDDING_OR_OVERRIDE
;
672 extern @GNULIB_UNICTYPE_PROPERTY_BIDI_OTHER_NEUTRAL_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_BIDI_OTHER_NEUTRAL
;
674 extern @GNULIB_UNICTYPE_PROPERTY_HEX_DIGIT_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_HEX_DIGIT
;
675 extern @GNULIB_UNICTYPE_PROPERTY_ASCII_HEX_DIGIT_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_ASCII_HEX_DIGIT
;
677 extern @GNULIB_UNICTYPE_PROPERTY_IDEOGRAPHIC_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_IDEOGRAPHIC
;
678 extern @GNULIB_UNICTYPE_PROPERTY_UNIFIED_IDEOGRAPH_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_UNIFIED_IDEOGRAPH
;
679 extern @GNULIB_UNICTYPE_PROPERTY_RADICAL_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_RADICAL
;
680 extern @GNULIB_UNICTYPE_PROPERTY_IDS_UNARY_OPERATOR_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_IDS_UNARY_OPERATOR
;
681 extern @GNULIB_UNICTYPE_PROPERTY_IDS_BINARY_OPERATOR_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_IDS_BINARY_OPERATOR
;
682 extern @GNULIB_UNICTYPE_PROPERTY_IDS_TRINARY_OPERATOR_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_IDS_TRINARY_OPERATOR
;
684 extern @GNULIB_UNICTYPE_PROPERTY_EMOJI_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_EMOJI
;
685 extern @GNULIB_UNICTYPE_PROPERTY_EMOJI_PRESENTATION_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_EMOJI_PRESENTATION
;
686 extern @GNULIB_UNICTYPE_PROPERTY_EMOJI_MODIFIER_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_EMOJI_MODIFIER
;
687 extern @GNULIB_UNICTYPE_PROPERTY_EMOJI_MODIFIER_BASE_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_EMOJI_MODIFIER_BASE
;
688 extern @GNULIB_UNICTYPE_PROPERTY_EMOJI_COMPONENT_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_EMOJI_COMPONENT
;
689 extern @GNULIB_UNICTYPE_PROPERTY_EXTENDED_PICTOGRAPHIC_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_EXTENDED_PICTOGRAPHIC
;
691 extern @GNULIB_UNICTYPE_PROPERTY_ZERO_WIDTH_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_ZERO_WIDTH
;
692 extern @GNULIB_UNICTYPE_PROPERTY_SPACE_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_SPACE
;
693 extern @GNULIB_UNICTYPE_PROPERTY_NON_BREAK_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_NON_BREAK
;
694 extern @GNULIB_UNICTYPE_PROPERTY_ISO_CONTROL_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_ISO_CONTROL
;
695 extern @GNULIB_UNICTYPE_PROPERTY_FORMAT_CONTROL_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_FORMAT_CONTROL
;
696 extern @GNULIB_UNICTYPE_PROPERTY_PREPENDED_CONCATENATION_MARK_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_PREPENDED_CONCATENATION_MARK
;
697 extern @GNULIB_UNICTYPE_PROPERTY_DASH_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_DASH
;
698 extern @GNULIB_UNICTYPE_PROPERTY_HYPHEN_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_HYPHEN
;
699 extern @GNULIB_UNICTYPE_PROPERTY_PUNCTUATION_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_PUNCTUATION
;
700 extern @GNULIB_UNICTYPE_PROPERTY_LINE_SEPARATOR_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_LINE_SEPARATOR
;
701 extern @GNULIB_UNICTYPE_PROPERTY_PARAGRAPH_SEPARATOR_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_PARAGRAPH_SEPARATOR
;
702 extern @GNULIB_UNICTYPE_PROPERTY_QUOTATION_MARK_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_QUOTATION_MARK
;
703 extern @GNULIB_UNICTYPE_PROPERTY_SENTENCE_TERMINAL_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_SENTENCE_TERMINAL
;
704 extern @GNULIB_UNICTYPE_PROPERTY_TERMINAL_PUNCTUATION_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_TERMINAL_PUNCTUATION
;
705 extern @GNULIB_UNICTYPE_PROPERTY_CURRENCY_SYMBOL_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_CURRENCY_SYMBOL
;
706 extern @GNULIB_UNICTYPE_PROPERTY_MATH_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_MATH
;
707 extern @GNULIB_UNICTYPE_PROPERTY_OTHER_MATH_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_OTHER_MATH
;
708 extern @GNULIB_UNICTYPE_PROPERTY_PAIRED_PUNCTUATION_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_PAIRED_PUNCTUATION
;
709 extern @GNULIB_UNICTYPE_PROPERTY_LEFT_OF_PAIR_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_LEFT_OF_PAIR
;
710 extern @GNULIB_UNICTYPE_PROPERTY_COMBINING_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_COMBINING
;
711 extern @GNULIB_UNICTYPE_PROPERTY_COMPOSITE_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_COMPOSITE
;
712 extern @GNULIB_UNICTYPE_PROPERTY_DECIMAL_DIGIT_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_DECIMAL_DIGIT
;
713 extern @GNULIB_UNICTYPE_PROPERTY_NUMERIC_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_NUMERIC
;
714 extern @GNULIB_UNICTYPE_PROPERTY_DIACRITIC_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_DIACRITIC
;
715 extern @GNULIB_UNICTYPE_PROPERTY_EXTENDER_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_EXTENDER
;
716 extern @GNULIB_UNICTYPE_PROPERTY_IGNORABLE_CONTROL_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_IGNORABLE_CONTROL
;
717 extern @GNULIB_UNICTYPE_PROPERTY_REGIONAL_INDICATOR_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_REGIONAL_INDICATOR
;
719 /* Return the property given by name, e.g. "White space". */
721 uc_property_byname (const char *property_name
);
723 /* Test whether a property is valid. */
724 #define uc_property_is_valid(property) ((property).test_fn != NULL)
726 /* Test whether a Unicode character has a given property. */
728 uc_is_property (ucs4_t uc
, uc_property_t property
);
729 extern bool uc_is_property_white_space (ucs4_t uc
)
731 extern bool uc_is_property_alphabetic (ucs4_t uc
)
733 extern bool uc_is_property_other_alphabetic (ucs4_t uc
)
735 extern bool uc_is_property_not_a_character (ucs4_t uc
)
737 extern bool uc_is_property_default_ignorable_code_point (ucs4_t uc
)
739 extern bool uc_is_property_other_default_ignorable_code_point (ucs4_t uc
)
741 extern bool uc_is_property_deprecated (ucs4_t uc
)
743 extern bool uc_is_property_logical_order_exception (ucs4_t uc
)
745 extern bool uc_is_property_variation_selector (ucs4_t uc
)
747 extern bool uc_is_property_private_use (ucs4_t uc
)
749 extern bool uc_is_property_unassigned_code_value (ucs4_t uc
)
751 extern bool uc_is_property_uppercase (ucs4_t uc
)
753 extern bool uc_is_property_other_uppercase (ucs4_t uc
)
755 extern bool uc_is_property_lowercase (ucs4_t uc
)
757 extern bool uc_is_property_other_lowercase (ucs4_t uc
)
759 extern bool uc_is_property_titlecase (ucs4_t uc
)
761 extern bool uc_is_property_cased (ucs4_t uc
)
763 extern bool uc_is_property_case_ignorable (ucs4_t uc
)
765 extern bool uc_is_property_changes_when_lowercased (ucs4_t uc
)
767 extern bool uc_is_property_changes_when_uppercased (ucs4_t uc
)
769 extern bool uc_is_property_changes_when_titlecased (ucs4_t uc
)
771 extern bool uc_is_property_changes_when_casefolded (ucs4_t uc
)
773 extern bool uc_is_property_changes_when_casemapped (ucs4_t uc
)
775 extern bool uc_is_property_soft_dotted (ucs4_t uc
)
777 extern bool uc_is_property_id_start (ucs4_t uc
)
779 extern bool uc_is_property_other_id_start (ucs4_t uc
)
781 extern bool uc_is_property_id_continue (ucs4_t uc
)
783 extern bool uc_is_property_other_id_continue (ucs4_t uc
)
785 extern bool uc_is_property_xid_start (ucs4_t uc
)
787 extern bool uc_is_property_xid_continue (ucs4_t uc
)
789 extern bool uc_is_property_id_compat_math_start (ucs4_t uc
)
791 extern bool uc_is_property_id_compat_math_continue (ucs4_t uc
)
793 extern bool uc_is_property_pattern_white_space (ucs4_t uc
)
795 extern bool uc_is_property_pattern_syntax (ucs4_t uc
)
797 extern bool uc_is_property_join_control (ucs4_t uc
)
799 extern bool uc_is_property_grapheme_base (ucs4_t uc
)
801 extern bool uc_is_property_grapheme_extend (ucs4_t uc
)
803 extern bool uc_is_property_other_grapheme_extend (ucs4_t uc
)
805 extern bool uc_is_property_grapheme_link (ucs4_t uc
)
807 extern bool uc_is_property_modifier_combining_mark (ucs4_t uc
)
809 extern bool uc_is_property_bidi_control (ucs4_t uc
)
811 extern bool uc_is_property_bidi_left_to_right (ucs4_t uc
)
813 extern bool uc_is_property_bidi_hebrew_right_to_left (ucs4_t uc
)
815 extern bool uc_is_property_bidi_arabic_right_to_left (ucs4_t uc
)
817 extern bool uc_is_property_bidi_european_digit (ucs4_t uc
)
819 extern bool uc_is_property_bidi_eur_num_separator (ucs4_t uc
)
821 extern bool uc_is_property_bidi_eur_num_terminator (ucs4_t uc
)
823 extern bool uc_is_property_bidi_arabic_digit (ucs4_t uc
)
825 extern bool uc_is_property_bidi_common_separator (ucs4_t uc
)
827 extern bool uc_is_property_bidi_block_separator (ucs4_t uc
)
829 extern bool uc_is_property_bidi_segment_separator (ucs4_t uc
)
831 extern bool uc_is_property_bidi_whitespace (ucs4_t uc
)
833 extern bool uc_is_property_bidi_non_spacing_mark (ucs4_t uc
)
835 extern bool uc_is_property_bidi_boundary_neutral (ucs4_t uc
)
837 extern bool uc_is_property_bidi_pdf (ucs4_t uc
)
839 extern bool uc_is_property_bidi_embedding_or_override (ucs4_t uc
)
841 extern bool uc_is_property_bidi_other_neutral (ucs4_t uc
)
843 extern bool uc_is_property_hex_digit (ucs4_t uc
)
845 extern bool uc_is_property_ascii_hex_digit (ucs4_t uc
)
847 extern bool uc_is_property_ideographic (ucs4_t uc
)
849 extern bool uc_is_property_unified_ideograph (ucs4_t uc
)
851 extern bool uc_is_property_radical (ucs4_t uc
)
853 extern bool uc_is_property_ids_unary_operator (ucs4_t uc
)
855 extern bool uc_is_property_ids_binary_operator (ucs4_t uc
)
857 extern bool uc_is_property_ids_trinary_operator (ucs4_t uc
)
859 extern bool uc_is_property_emoji (ucs4_t uc
)
861 extern bool uc_is_property_emoji_presentation (ucs4_t uc
)
863 extern bool uc_is_property_emoji_modifier (ucs4_t uc
)
865 extern bool uc_is_property_emoji_modifier_base (ucs4_t uc
)
867 extern bool uc_is_property_emoji_component (ucs4_t uc
)
869 extern bool uc_is_property_extended_pictographic (ucs4_t uc
)
871 extern bool uc_is_property_zero_width (ucs4_t uc
)
873 extern bool uc_is_property_space (ucs4_t uc
)
875 extern bool uc_is_property_non_break (ucs4_t uc
)
877 extern bool uc_is_property_iso_control (ucs4_t uc
)
879 extern bool uc_is_property_format_control (ucs4_t uc
)
881 extern bool uc_is_property_prepended_concatenation_mark (ucs4_t uc
)
883 extern bool uc_is_property_dash (ucs4_t uc
)
885 extern bool uc_is_property_hyphen (ucs4_t uc
)
887 extern bool uc_is_property_punctuation (ucs4_t uc
)
889 extern bool uc_is_property_line_separator (ucs4_t uc
)
891 extern bool uc_is_property_paragraph_separator (ucs4_t uc
)
893 extern bool uc_is_property_quotation_mark (ucs4_t uc
)
895 extern bool uc_is_property_sentence_terminal (ucs4_t uc
)
897 extern bool uc_is_property_terminal_punctuation (ucs4_t uc
)
899 extern bool uc_is_property_currency_symbol (ucs4_t uc
)
901 extern bool uc_is_property_math (ucs4_t uc
)
903 extern bool uc_is_property_other_math (ucs4_t uc
)
905 extern bool uc_is_property_paired_punctuation (ucs4_t uc
)
907 extern bool uc_is_property_left_of_pair (ucs4_t uc
)
909 extern bool uc_is_property_combining (ucs4_t uc
)
911 extern bool uc_is_property_composite (ucs4_t uc
)
913 extern bool uc_is_property_decimal_digit (ucs4_t uc
)
915 extern bool uc_is_property_numeric (ucs4_t uc
)
917 extern bool uc_is_property_diacritic (ucs4_t uc
)
919 extern bool uc_is_property_extender (ucs4_t uc
)
921 extern bool uc_is_property_ignorable_control (ucs4_t uc
)
923 extern bool uc_is_property_regional_indicator (ucs4_t uc
)
926 /* ========================================================================= */
928 /* Other attributes. */
930 /* ------------------------------------------------------------------------- */
932 /* Indic_Conjunct_Break (InCB): from the file DerivedCoreProperties.txt
933 in the Unicode Character Database. */
935 /* Possible values of the Indic_Conjunct_Break attribute.
936 This enumeration may be extended in the future. */
939 UC_INDIC_CONJUNCT_BREAK_NONE
, /* None */
940 UC_INDIC_CONJUNCT_BREAK_CONSONANT
, /* Consonant */
941 UC_INDIC_CONJUNCT_BREAK_LINKER
, /* Linker */
942 UC_INDIC_CONJUNCT_BREAK_EXTEND
/* Extend */
945 /* Return the name of an Indic_Conjunct_Break value. */
947 uc_indic_conjunct_break_name (int indic_conjunct_break
)
950 /* Return the Indic_Conjunct_Break value given by name, e.g. "Consonant". */
952 uc_indic_conjunct_break_byname (const char *indic_conjunct_break_name
)
955 /* Return the Indic_Conjunct_Break attribute of a Unicode character. */
957 uc_indic_conjunct_break (ucs4_t uc
)
960 /* ========================================================================= */
962 /* Subdivision of the Unicode characters into scripts. */
966 unsigned int code
: 21;
967 unsigned int start
: 1;
968 unsigned int end
: 1;
973 unsigned int nintervals
;
974 const uc_interval_t
*intervals
;
979 /* Return the script of a Unicode character. */
980 extern const uc_script_t
*
981 uc_script (ucs4_t uc
)
984 /* Return the script given by name, e.g. "HAN". */
985 extern const uc_script_t
*
986 uc_script_byname (const char *script_name
)
989 /* Test whether a Unicode character belongs to a given script. */
991 uc_is_script (ucs4_t uc
, const uc_script_t
*script
)
994 /* Get the list of all scripts. */
996 uc_all_scripts (const uc_script_t
**scripts
, size_t *count
);
998 /* ========================================================================= */
1000 /* Subdivision of the Unicode character range into blocks. */
1010 /* Return the block a character belongs to. */
1011 extern const uc_block_t
*
1012 uc_block (ucs4_t uc
)
1013 _UC_ATTRIBUTE_CONST
;
1015 /* Test whether a Unicode character belongs to a given block. */
1017 uc_is_block (ucs4_t uc
, const uc_block_t
*block
)
1020 /* Get the list of all blocks. */
1022 uc_all_blocks (const uc_block_t
**blocks
, size_t *count
);
1024 /* ========================================================================= */
1026 /* Properties taken from language standards. */
1028 /* Test whether a Unicode character is considered whitespace in ISO C 99. */
1030 uc_is_c_whitespace (ucs4_t uc
)
1031 _UC_ATTRIBUTE_CONST
;
1033 /* Test whether a Unicode character is considered whitespace in Java. */
1035 uc_is_java_whitespace (ucs4_t uc
)
1036 _UC_ATTRIBUTE_CONST
;
1040 UC_IDENTIFIER_START
, /* valid as first or subsequent character */
1041 UC_IDENTIFIER_VALID
, /* valid as subsequent character only */
1042 UC_IDENTIFIER_INVALID
, /* not valid */
1043 UC_IDENTIFIER_IGNORABLE
/* ignorable (Java only) */
1046 /* Return the categorization of a Unicode character w.r.t. the ISO C 99
1047 identifier syntax. */
1049 uc_c_ident_category (ucs4_t uc
)
1050 _UC_ATTRIBUTE_CONST
;
1052 /* Return the categorization of a Unicode character w.r.t. the Java
1053 identifier syntax. */
1055 uc_java_ident_category (ucs4_t uc
)
1056 _UC_ATTRIBUTE_CONST
;
1058 /* ========================================================================= */
1060 /* Like ISO C <ctype.h> and <wctype.h>. These functions are deprecated,
1061 because this set of functions was designed with ASCII in mind and cannot
1062 reflect the more diverse reality of the Unicode character set. But they
1063 can be a quick-and-dirty porting aid when migrating from wchar_t APIs
1064 to Unicode strings. */
1066 /* Test for any character for which 'uc_is_alpha' or 'uc_is_digit' is true. */
1068 uc_is_alnum (ucs4_t uc
)
1069 _UC_ATTRIBUTE_CONST
;
1071 /* Test for any character for which 'uc_is_upper' or 'uc_is_lower' is true,
1072 or any character that is one of a locale-specific set of characters for
1073 which none of 'uc_is_cntrl', 'uc_is_digit', 'uc_is_punct', or 'uc_is_space'
1076 uc_is_alpha (ucs4_t uc
)
1077 _UC_ATTRIBUTE_CONST
;
1079 /* Test for any control character. */
1081 uc_is_cntrl (ucs4_t uc
)
1082 _UC_ATTRIBUTE_CONST
;
1084 /* Test for any character that corresponds to a decimal-digit character. */
1086 uc_is_digit (ucs4_t uc
)
1087 _UC_ATTRIBUTE_CONST
;
1089 /* Test for any character for which 'uc_is_print' is true and 'uc_is_space'
1092 uc_is_graph (ucs4_t uc
)
1093 _UC_ATTRIBUTE_CONST
;
1095 /* Test for any character that corresponds to a lowercase letter or is one
1096 of a locale-specific set of characters for which none of 'uc_is_cntrl',
1097 'uc_is_digit', 'uc_is_punct', or 'uc_is_space' is true. */
1099 uc_is_lower (ucs4_t uc
)
1100 _UC_ATTRIBUTE_CONST
;
1102 /* Test for any printing character. */
1104 uc_is_print (ucs4_t uc
)
1105 _UC_ATTRIBUTE_CONST
;
1107 /* Test for any printing character that is one of a locale-specific set of
1108 characters for which neither 'uc_is_space' nor 'uc_is_alnum' is true. */
1110 uc_is_punct (ucs4_t uc
)
1111 _UC_ATTRIBUTE_CONST
;
1113 /* Test for any character that corresponds to a locale-specific set of
1114 characters for which none of 'uc_is_alnum', 'uc_is_graph', or 'uc_is_punct'
1117 uc_is_space (ucs4_t uc
)
1118 _UC_ATTRIBUTE_CONST
;
1120 /* Test for any character that corresponds to an uppercase letter or is one
1121 of a locale-specific set of character for which none of 'uc_is_cntrl',
1122 'uc_is_digit', 'uc_is_punct', or 'uc_is_space' is true. */
1124 uc_is_upper (ucs4_t uc
)
1125 _UC_ATTRIBUTE_CONST
;
1127 /* Test for any character that corresponds to a hexadecimal-digit
1130 uc_is_xdigit (ucs4_t uc
)
1131 _UC_ATTRIBUTE_CONST
;
1133 /* GNU extension. */
1134 /* Test for any character that corresponds to a standard blank character or
1135 a locale-specific set of characters for which 'uc_is_alnum' is false. */
1137 uc_is_blank (ucs4_t uc
)
1138 _UC_ATTRIBUTE_CONST
;
1140 /* ========================================================================= */
1146 #endif /* _UNICTYPE_H */