1 /* libxml2 - Library for parsing XML documents
2  * Copyright (C) 2006-2019 Free Software Foundation, Inc.
3  *
4  * This file is not part of the GNU gettext program, but is used with
5  * GNU gettext.
6  *
7  * The original copyright notice is as follows:
8  */
9 
10 /*
11  * Copyright (C) 1998-2012 Daniel Veillard.  All Rights Reserved.
12  *
13  * Permission is hereby granted, free of charge, to any person obtaining a copy
14  * of this software and associated documentation files (the "Software"), to deal
15  * in the Software without restriction, including without limitation the rights
16  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17  * copies of the Software, and to permit persons to whom the Software is fur-
18  * nished to do so, subject to the following conditions:
19  *
20  * The above copyright notice and this permission notice shall be included in
21  * all copies or substantial portions of the Software.
22  *
23  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
25  * NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
26  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
29  * THE SOFTWARE.
30  */
31 
32 /*
33  * xmlunicode.c: this module implements the Unicode character APIs
34  *
35  * This file is automatically generated from the
36  * UCS description files of the Unicode Character Database
37  * http://www.unicode.org/Public/4.0-Update1/UCD-4.0.1.html
38  * using the genUnicode.py Python script.
39  *
40  * Generation date: Mon Mar 27 11:09:52 2006
41  * Sources: Blocks-4.0.1.txt UnicodeData-4.0.1.txt
42  * Daniel Veillard <veillard@redhat.com>
43  */
44 
45 #define IN_LIBXML
46 #include "libxml.h"
47 
48 #ifdef LIBXML_UNICODE_ENABLED
49 
50 #include <string.h>
51 #include <libxml/xmlversion.h>
52 #include <libxml/xmlunicode.h>
53 #include <libxml/chvalid.h>
54 
55 typedef int (xmlIntFunc)(int);	/* just to keep one's mind untwisted */
56 
57 typedef struct {
58     const char *rangename;
59     xmlIntFunc *func;
60 } xmlUnicodeRange;
61 
62 typedef struct {
63     const xmlUnicodeRange *table;
64     int		    numentries;
65 } xmlUnicodeNameTable;
66 
67 
68 static xmlIntFunc *xmlUnicodeLookup(xmlUnicodeNameTable *tptr, const char *tname);
69 
70 static const xmlUnicodeRange xmlUnicodeBlocks[] = {
71   {"AegeanNumbers", xmlUCSIsAegeanNumbers},
72   {"AlphabeticPresentationForms", xmlUCSIsAlphabeticPresentationForms},
73   {"Arabic", xmlUCSIsArabic},
74   {"ArabicPresentationForms-A", xmlUCSIsArabicPresentationFormsA},
75   {"ArabicPresentationForms-B", xmlUCSIsArabicPresentationFormsB},
76   {"Armenian", xmlUCSIsArmenian},
77   {"Arrows", xmlUCSIsArrows},
78   {"BasicLatin", xmlUCSIsBasicLatin},
79   {"Bengali", xmlUCSIsBengali},
80   {"BlockElements", xmlUCSIsBlockElements},
81   {"Bopomofo", xmlUCSIsBopomofo},
82   {"BopomofoExtended", xmlUCSIsBopomofoExtended},
83   {"BoxDrawing", xmlUCSIsBoxDrawing},
84   {"BraillePatterns", xmlUCSIsBraillePatterns},
85   {"Buhid", xmlUCSIsBuhid},
86   {"ByzantineMusicalSymbols", xmlUCSIsByzantineMusicalSymbols},
87   {"CJKCompatibility", xmlUCSIsCJKCompatibility},
88   {"CJKCompatibilityForms", xmlUCSIsCJKCompatibilityForms},
89   {"CJKCompatibilityIdeographs", xmlUCSIsCJKCompatibilityIdeographs},
90   {"CJKCompatibilityIdeographsSupplement", xmlUCSIsCJKCompatibilityIdeographsSupplement},
91   {"CJKRadicalsSupplement", xmlUCSIsCJKRadicalsSupplement},
92   {"CJKSymbolsandPunctuation", xmlUCSIsCJKSymbolsandPunctuation},
93   {"CJKUnifiedIdeographs", xmlUCSIsCJKUnifiedIdeographs},
94   {"CJKUnifiedIdeographsExtensionA", xmlUCSIsCJKUnifiedIdeographsExtensionA},
95   {"CJKUnifiedIdeographsExtensionB", xmlUCSIsCJKUnifiedIdeographsExtensionB},
96   {"Cherokee", xmlUCSIsCherokee},
97   {"CombiningDiacriticalMarks", xmlUCSIsCombiningDiacriticalMarks},
98   {"CombiningDiacriticalMarksforSymbols", xmlUCSIsCombiningDiacriticalMarksforSymbols},
99   {"CombiningHalfMarks", xmlUCSIsCombiningHalfMarks},
100   {"CombiningMarksforSymbols", xmlUCSIsCombiningMarksforSymbols},
101   {"ControlPictures", xmlUCSIsControlPictures},
102   {"CurrencySymbols", xmlUCSIsCurrencySymbols},
103   {"CypriotSyllabary", xmlUCSIsCypriotSyllabary},
104   {"Cyrillic", xmlUCSIsCyrillic},
105   {"CyrillicSupplement", xmlUCSIsCyrillicSupplement},
106   {"Deseret", xmlUCSIsDeseret},
107   {"Devanagari", xmlUCSIsDevanagari},
108   {"Dingbats", xmlUCSIsDingbats},
109   {"EnclosedAlphanumerics", xmlUCSIsEnclosedAlphanumerics},
110   {"EnclosedCJKLettersandMonths", xmlUCSIsEnclosedCJKLettersandMonths},
111   {"Ethiopic", xmlUCSIsEthiopic},
112   {"GeneralPunctuation", xmlUCSIsGeneralPunctuation},
113   {"GeometricShapes", xmlUCSIsGeometricShapes},
114   {"Georgian", xmlUCSIsGeorgian},
115   {"Gothic", xmlUCSIsGothic},
116   {"Greek", xmlUCSIsGreek},
117   {"GreekExtended", xmlUCSIsGreekExtended},
118   {"GreekandCoptic", xmlUCSIsGreekandCoptic},
119   {"Gujarati", xmlUCSIsGujarati},
120   {"Gurmukhi", xmlUCSIsGurmukhi},
121   {"HalfwidthandFullwidthForms", xmlUCSIsHalfwidthandFullwidthForms},
122   {"HangulCompatibilityJamo", xmlUCSIsHangulCompatibilityJamo},
123   {"HangulJamo", xmlUCSIsHangulJamo},
124   {"HangulSyllables", xmlUCSIsHangulSyllables},
125   {"Hanunoo", xmlUCSIsHanunoo},
126   {"Hebrew", xmlUCSIsHebrew},
127   {"HighPrivateUseSurrogates", xmlUCSIsHighPrivateUseSurrogates},
128   {"HighSurrogates", xmlUCSIsHighSurrogates},
129   {"Hiragana", xmlUCSIsHiragana},
130   {"IPAExtensions", xmlUCSIsIPAExtensions},
131   {"IdeographicDescriptionCharacters", xmlUCSIsIdeographicDescriptionCharacters},
132   {"Kanbun", xmlUCSIsKanbun},
133   {"KangxiRadicals", xmlUCSIsKangxiRadicals},
134   {"Kannada", xmlUCSIsKannada},
135   {"Katakana", xmlUCSIsKatakana},
136   {"KatakanaPhoneticExtensions", xmlUCSIsKatakanaPhoneticExtensions},
137   {"Khmer", xmlUCSIsKhmer},
138   {"KhmerSymbols", xmlUCSIsKhmerSymbols},
139   {"Lao", xmlUCSIsLao},
140   {"Latin-1Supplement", xmlUCSIsLatin1Supplement},
141   {"LatinExtended-A", xmlUCSIsLatinExtendedA},
142   {"LatinExtended-B", xmlUCSIsLatinExtendedB},
143   {"LatinExtendedAdditional", xmlUCSIsLatinExtendedAdditional},
144   {"LetterlikeSymbols", xmlUCSIsLetterlikeSymbols},
145   {"Limbu", xmlUCSIsLimbu},
146   {"LinearBIdeograms", xmlUCSIsLinearBIdeograms},
147   {"LinearBSyllabary", xmlUCSIsLinearBSyllabary},
148   {"LowSurrogates", xmlUCSIsLowSurrogates},
149   {"Malayalam", xmlUCSIsMalayalam},
150   {"MathematicalAlphanumericSymbols", xmlUCSIsMathematicalAlphanumericSymbols},
151   {"MathematicalOperators", xmlUCSIsMathematicalOperators},
152   {"MiscellaneousMathematicalSymbols-A", xmlUCSIsMiscellaneousMathematicalSymbolsA},
153   {"MiscellaneousMathematicalSymbols-B", xmlUCSIsMiscellaneousMathematicalSymbolsB},
154   {"MiscellaneousSymbols", xmlUCSIsMiscellaneousSymbols},
155   {"MiscellaneousSymbolsandArrows", xmlUCSIsMiscellaneousSymbolsandArrows},
156   {"MiscellaneousTechnical", xmlUCSIsMiscellaneousTechnical},
157   {"Mongolian", xmlUCSIsMongolian},
158   {"MusicalSymbols", xmlUCSIsMusicalSymbols},
159   {"Myanmar", xmlUCSIsMyanmar},
160   {"NumberForms", xmlUCSIsNumberForms},
161   {"Ogham", xmlUCSIsOgham},
162   {"OldItalic", xmlUCSIsOldItalic},
163   {"OpticalCharacterRecognition", xmlUCSIsOpticalCharacterRecognition},
164   {"Oriya", xmlUCSIsOriya},
165   {"Osmanya", xmlUCSIsOsmanya},
166   {"PhoneticExtensions", xmlUCSIsPhoneticExtensions},
167   {"PrivateUse", xmlUCSIsPrivateUse},
168   {"PrivateUseArea", xmlUCSIsPrivateUseArea},
169   {"Runic", xmlUCSIsRunic},
170   {"Shavian", xmlUCSIsShavian},
171   {"Sinhala", xmlUCSIsSinhala},
172   {"SmallFormVariants", xmlUCSIsSmallFormVariants},
173   {"SpacingModifierLetters", xmlUCSIsSpacingModifierLetters},
174   {"Specials", xmlUCSIsSpecials},
175   {"SuperscriptsandSubscripts", xmlUCSIsSuperscriptsandSubscripts},
176   {"SupplementalArrows-A", xmlUCSIsSupplementalArrowsA},
177   {"SupplementalArrows-B", xmlUCSIsSupplementalArrowsB},
178   {"SupplementalMathematicalOperators", xmlUCSIsSupplementalMathematicalOperators},
179   {"SupplementaryPrivateUseArea-A", xmlUCSIsSupplementaryPrivateUseAreaA},
180   {"SupplementaryPrivateUseArea-B", xmlUCSIsSupplementaryPrivateUseAreaB},
181   {"Syriac", xmlUCSIsSyriac},
182   {"Tagalog", xmlUCSIsTagalog},
183   {"Tagbanwa", xmlUCSIsTagbanwa},
184   {"Tags", xmlUCSIsTags},
185   {"TaiLe", xmlUCSIsTaiLe},
186   {"TaiXuanJingSymbols", xmlUCSIsTaiXuanJingSymbols},
187   {"Tamil", xmlUCSIsTamil},
188   {"Telugu", xmlUCSIsTelugu},
189   {"Thaana", xmlUCSIsThaana},
190   {"Thai", xmlUCSIsThai},
191   {"Tibetan", xmlUCSIsTibetan},
192   {"Ugaritic", xmlUCSIsUgaritic},
193   {"UnifiedCanadianAboriginalSyllabics", xmlUCSIsUnifiedCanadianAboriginalSyllabics},
194   {"VariationSelectors", xmlUCSIsVariationSelectors},
195   {"VariationSelectorsSupplement", xmlUCSIsVariationSelectorsSupplement},
196   {"YiRadicals", xmlUCSIsYiRadicals},
197   {"YiSyllables", xmlUCSIsYiSyllables},
198   {"YijingHexagramSymbols", xmlUCSIsYijingHexagramSymbols}};
199 
200 static xmlUnicodeRange xmlUnicodeCats[] = {
201   {"C", xmlUCSIsCatC},
202   {"Cc", xmlUCSIsCatCc},
203   {"Cf", xmlUCSIsCatCf},
204   {"Co", xmlUCSIsCatCo},
205   {"Cs", xmlUCSIsCatCs},
206   {"L", xmlUCSIsCatL},
207   {"Ll", xmlUCSIsCatLl},
208   {"Lm", xmlUCSIsCatLm},
209   {"Lo", xmlUCSIsCatLo},
210   {"Lt", xmlUCSIsCatLt},
211   {"Lu", xmlUCSIsCatLu},
212   {"M", xmlUCSIsCatM},
213   {"Mc", xmlUCSIsCatMc},
214   {"Me", xmlUCSIsCatMe},
215   {"Mn", xmlUCSIsCatMn},
216   {"N", xmlUCSIsCatN},
217   {"Nd", xmlUCSIsCatNd},
218   {"Nl", xmlUCSIsCatNl},
219   {"No", xmlUCSIsCatNo},
220   {"P", xmlUCSIsCatP},
221   {"Pc", xmlUCSIsCatPc},
222   {"Pd", xmlUCSIsCatPd},
223   {"Pe", xmlUCSIsCatPe},
224   {"Pf", xmlUCSIsCatPf},
225   {"Pi", xmlUCSIsCatPi},
226   {"Po", xmlUCSIsCatPo},
227   {"Ps", xmlUCSIsCatPs},
228   {"S", xmlUCSIsCatS},
229   {"Sc", xmlUCSIsCatSc},
230   {"Sk", xmlUCSIsCatSk},
231   {"Sm", xmlUCSIsCatSm},
232   {"So", xmlUCSIsCatSo},
233   {"Z", xmlUCSIsCatZ},
234   {"Zl", xmlUCSIsCatZl},
235   {"Zp", xmlUCSIsCatZp},
236   {"Zs", xmlUCSIsCatZs}};
237 
238 static const xmlChSRange xmlCS[] = {{0x0, 0x1f}, {0x7f, 0x9f},
239     {0xad, 0xad}, {0x600, 0x603}, {0x6dd, 0x6dd}, {0x70f, 0x70f},
240     {0x17b4, 0x17b5}, {0x200b, 0x200f}, {0x202a, 0x202e}, {0x2060, 0x2063},
241     {0x206a, 0x206f}, {0xd800, 0xd800}, {0xdb7f, 0xdb80}, {0xdbff, 0xdc00},
242     {0xdfff, 0xe000}, {0xf8ff, 0xf8ff}, {0xfeff, 0xfeff}, {0xfff9, 0xfffb} };
243 static const xmlChLRange xmlCL[] = {{0x1d173, 0x1d17a}, {0xe0001, 0xe0001},
244     {0xe0020, 0xe007f}, {0xf0000, 0xf0000}, {0xffffd, 0xffffd},
245     {0x100000, 0x100000}, {0x10fffd, 0x10fffd} };
246 static xmlChRangeGroup xmlCG = {18,7,xmlCS,xmlCL};
247 
248 static const xmlChSRange xmlCfS[] = {{0xad, 0xad}, {0x600, 0x603},
249     {0x6dd, 0x6dd}, {0x70f, 0x70f}, {0x17b4, 0x17b5}, {0x200b, 0x200f},
250     {0x202a, 0x202e}, {0x2060, 0x2063}, {0x206a, 0x206f}, {0xfeff, 0xfeff},
251     {0xfff9, 0xfffb} };
252 static const xmlChLRange xmlCfL[] = {{0x1d173, 0x1d17a}, {0xe0001, 0xe0001},
253     {0xe0020, 0xe007f} };
254 static xmlChRangeGroup xmlCfG = {11,3,xmlCfS,xmlCfL};
255 
256 static const xmlChSRange xmlLS[] = {{0x41, 0x5a}, {0x61, 0x7a},
257     {0xaa, 0xaa}, {0xb5, 0xb5}, {0xba, 0xba}, {0xc0, 0xd6}, {0xd8, 0xf6},
258     {0xf8, 0x236}, {0x250, 0x2c1}, {0x2c6, 0x2d1}, {0x2e0, 0x2e4},
259     {0x2ee, 0x2ee}, {0x37a, 0x37a}, {0x386, 0x386}, {0x388, 0x38a},
260     {0x38c, 0x38c}, {0x38e, 0x3a1}, {0x3a3, 0x3ce}, {0x3d0, 0x3f5},
261     {0x3f7, 0x3fb}, {0x400, 0x481}, {0x48a, 0x4ce}, {0x4d0, 0x4f5},
262     {0x4f8, 0x4f9}, {0x500, 0x50f}, {0x531, 0x556}, {0x559, 0x559},
263     {0x561, 0x587}, {0x5d0, 0x5ea}, {0x5f0, 0x5f2}, {0x621, 0x63a},
264     {0x640, 0x64a}, {0x66e, 0x66f}, {0x671, 0x6d3}, {0x6d5, 0x6d5},
265     {0x6e5, 0x6e6}, {0x6ee, 0x6ef}, {0x6fa, 0x6fc}, {0x6ff, 0x6ff},
266     {0x710, 0x710}, {0x712, 0x72f}, {0x74d, 0x74f}, {0x780, 0x7a5},
267     {0x7b1, 0x7b1}, {0x904, 0x939}, {0x93d, 0x93d}, {0x950, 0x950},
268     {0x958, 0x961}, {0x985, 0x98c}, {0x98f, 0x990}, {0x993, 0x9a8},
269     {0x9aa, 0x9b0}, {0x9b2, 0x9b2}, {0x9b6, 0x9b9}, {0x9bd, 0x9bd},
270     {0x9dc, 0x9dd}, {0x9df, 0x9e1}, {0x9f0, 0x9f1}, {0xa05, 0xa0a},
271     {0xa0f, 0xa10}, {0xa13, 0xa28}, {0xa2a, 0xa30}, {0xa32, 0xa33},
272     {0xa35, 0xa36}, {0xa38, 0xa39}, {0xa59, 0xa5c}, {0xa5e, 0xa5e},
273     {0xa72, 0xa74}, {0xa85, 0xa8d}, {0xa8f, 0xa91}, {0xa93, 0xaa8},
274     {0xaaa, 0xab0}, {0xab2, 0xab3}, {0xab5, 0xab9}, {0xabd, 0xabd},
275     {0xad0, 0xad0}, {0xae0, 0xae1}, {0xb05, 0xb0c}, {0xb0f, 0xb10},
276     {0xb13, 0xb28}, {0xb2a, 0xb30}, {0xb32, 0xb33}, {0xb35, 0xb39},
277     {0xb3d, 0xb3d}, {0xb5c, 0xb5d}, {0xb5f, 0xb61}, {0xb71, 0xb71},
278     {0xb83, 0xb83}, {0xb85, 0xb8a}, {0xb8e, 0xb90}, {0xb92, 0xb95},
279     {0xb99, 0xb9a}, {0xb9c, 0xb9c}, {0xb9e, 0xb9f}, {0xba3, 0xba4},
280     {0xba8, 0xbaa}, {0xbae, 0xbb5}, {0xbb7, 0xbb9}, {0xc05, 0xc0c},
281     {0xc0e, 0xc10}, {0xc12, 0xc28}, {0xc2a, 0xc33}, {0xc35, 0xc39},
282     {0xc60, 0xc61}, {0xc85, 0xc8c}, {0xc8e, 0xc90}, {0xc92, 0xca8},
283     {0xcaa, 0xcb3}, {0xcb5, 0xcb9}, {0xcbd, 0xcbd}, {0xcde, 0xcde},
284     {0xce0, 0xce1}, {0xd05, 0xd0c}, {0xd0e, 0xd10}, {0xd12, 0xd28},
285     {0xd2a, 0xd39}, {0xd60, 0xd61}, {0xd85, 0xd96}, {0xd9a, 0xdb1},
286     {0xdb3, 0xdbb}, {0xdbd, 0xdbd}, {0xdc0, 0xdc6}, {0xe01, 0xe30},
287     {0xe32, 0xe33}, {0xe40, 0xe46}, {0xe81, 0xe82}, {0xe84, 0xe84},
288     {0xe87, 0xe88}, {0xe8a, 0xe8a}, {0xe8d, 0xe8d}, {0xe94, 0xe97},
289     {0xe99, 0xe9f}, {0xea1, 0xea3}, {0xea5, 0xea5}, {0xea7, 0xea7},
290     {0xeaa, 0xeab}, {0xead, 0xeb0}, {0xeb2, 0xeb3}, {0xebd, 0xebd},
291     {0xec0, 0xec4}, {0xec6, 0xec6}, {0xedc, 0xedd}, {0xf00, 0xf00},
292     {0xf40, 0xf47}, {0xf49, 0xf6a}, {0xf88, 0xf8b}, {0x1000, 0x1021},
293     {0x1023, 0x1027}, {0x1029, 0x102a}, {0x1050, 0x1055}, {0x10a0, 0x10c5},
294     {0x10d0, 0x10f8}, {0x1100, 0x1159}, {0x115f, 0x11a2}, {0x11a8, 0x11f9},
295     {0x1200, 0x1206}, {0x1208, 0x1246}, {0x1248, 0x1248}, {0x124a, 0x124d},
296     {0x1250, 0x1256}, {0x1258, 0x1258}, {0x125a, 0x125d}, {0x1260, 0x1286},
297     {0x1288, 0x1288}, {0x128a, 0x128d}, {0x1290, 0x12ae}, {0x12b0, 0x12b0},
298     {0x12b2, 0x12b5}, {0x12b8, 0x12be}, {0x12c0, 0x12c0}, {0x12c2, 0x12c5},
299     {0x12c8, 0x12ce}, {0x12d0, 0x12d6}, {0x12d8, 0x12ee}, {0x12f0, 0x130e},
300     {0x1310, 0x1310}, {0x1312, 0x1315}, {0x1318, 0x131e}, {0x1320, 0x1346},
301     {0x1348, 0x135a}, {0x13a0, 0x13f4}, {0x1401, 0x166c}, {0x166f, 0x1676},
302     {0x1681, 0x169a}, {0x16a0, 0x16ea}, {0x1700, 0x170c}, {0x170e, 0x1711},
303     {0x1720, 0x1731}, {0x1740, 0x1751}, {0x1760, 0x176c}, {0x176e, 0x1770},
304     {0x1780, 0x17b3}, {0x17d7, 0x17d7}, {0x17dc, 0x17dc}, {0x1820, 0x1877},
305     {0x1880, 0x18a8}, {0x1900, 0x191c}, {0x1950, 0x196d}, {0x1970, 0x1974},
306     {0x1d00, 0x1d6b}, {0x1e00, 0x1e9b}, {0x1ea0, 0x1ef9}, {0x1f00, 0x1f15},
307     {0x1f18, 0x1f1d}, {0x1f20, 0x1f45}, {0x1f48, 0x1f4d}, {0x1f50, 0x1f57},
308     {0x1f59, 0x1f59}, {0x1f5b, 0x1f5b}, {0x1f5d, 0x1f5d}, {0x1f5f, 0x1f7d},
309     {0x1f80, 0x1fb4}, {0x1fb6, 0x1fbc}, {0x1fbe, 0x1fbe}, {0x1fc2, 0x1fc4},
310     {0x1fc6, 0x1fcc}, {0x1fd0, 0x1fd3}, {0x1fd6, 0x1fdb}, {0x1fe0, 0x1fec},
311     {0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffc}, {0x2071, 0x2071}, {0x207f, 0x207f},
312     {0x2102, 0x2102}, {0x2107, 0x2107}, {0x210a, 0x2113}, {0x2115, 0x2115},
313     {0x2119, 0x211d}, {0x2124, 0x2124}, {0x2126, 0x2126}, {0x2128, 0x2128},
314     {0x212a, 0x212d}, {0x212f, 0x2131}, {0x2133, 0x2139}, {0x213d, 0x213f},
315     {0x2145, 0x2149}, {0x3005, 0x3006}, {0x3031, 0x3035}, {0x303b, 0x303c},
316     {0x3041, 0x3096}, {0x309d, 0x309f}, {0x30a1, 0x30fa}, {0x30fc, 0x30ff},
317     {0x3105, 0x312c}, {0x3131, 0x318e}, {0x31a0, 0x31b7}, {0x31f0, 0x31ff},
318     {0x3400, 0x3400}, {0x4db5, 0x4db5}, {0x4e00, 0x4e00}, {0x9fa5, 0x9fa5},
319     {0xa000, 0xa48c}, {0xac00, 0xac00}, {0xd7a3, 0xd7a3}, {0xf900, 0xfa2d},
320     {0xfa30, 0xfa6a}, {0xfb00, 0xfb06}, {0xfb13, 0xfb17}, {0xfb1d, 0xfb1d},
321     {0xfb1f, 0xfb28}, {0xfb2a, 0xfb36}, {0xfb38, 0xfb3c}, {0xfb3e, 0xfb3e},
322     {0xfb40, 0xfb41}, {0xfb43, 0xfb44}, {0xfb46, 0xfbb1}, {0xfbd3, 0xfd3d},
323     {0xfd50, 0xfd8f}, {0xfd92, 0xfdc7}, {0xfdf0, 0xfdfb}, {0xfe70, 0xfe74},
324     {0xfe76, 0xfefc}, {0xff21, 0xff3a}, {0xff41, 0xff5a}, {0xff66, 0xffbe},
325     {0xffc2, 0xffc7}, {0xffca, 0xffcf}, {0xffd2, 0xffd7}, {0xffda, 0xffdc} };
326 static const xmlChLRange xmlLL[] = {{0x10000, 0x1000b}, {0x1000d, 0x10026},
327     {0x10028, 0x1003a}, {0x1003c, 0x1003d}, {0x1003f, 0x1004d},
328     {0x10050, 0x1005d}, {0x10080, 0x100fa}, {0x10300, 0x1031e},
329     {0x10330, 0x10349}, {0x10380, 0x1039d}, {0x10400, 0x1049d},
330     {0x10800, 0x10805}, {0x10808, 0x10808}, {0x1080a, 0x10835},
331     {0x10837, 0x10838}, {0x1083c, 0x1083c}, {0x1083f, 0x1083f},
332     {0x1d400, 0x1d454}, {0x1d456, 0x1d49c}, {0x1d49e, 0x1d49f},
333     {0x1d4a2, 0x1d4a2}, {0x1d4a5, 0x1d4a6}, {0x1d4a9, 0x1d4ac},
334     {0x1d4ae, 0x1d4b9}, {0x1d4bb, 0x1d4bb}, {0x1d4bd, 0x1d4c3},
335     {0x1d4c5, 0x1d505}, {0x1d507, 0x1d50a}, {0x1d50d, 0x1d514},
336     {0x1d516, 0x1d51c}, {0x1d51e, 0x1d539}, {0x1d53b, 0x1d53e},
337     {0x1d540, 0x1d544}, {0x1d546, 0x1d546}, {0x1d54a, 0x1d550},
338     {0x1d552, 0x1d6a3}, {0x1d6a8, 0x1d6c0}, {0x1d6c2, 0x1d6da},
339     {0x1d6dc, 0x1d6fa}, {0x1d6fc, 0x1d714}, {0x1d716, 0x1d734},
340     {0x1d736, 0x1d74e}, {0x1d750, 0x1d76e}, {0x1d770, 0x1d788},
341     {0x1d78a, 0x1d7a8}, {0x1d7aa, 0x1d7c2}, {0x1d7c4, 0x1d7c9},
342     {0x20000, 0x20000}, {0x2a6d6, 0x2a6d6}, {0x2f800, 0x2fa1d} };
343 static xmlChRangeGroup xmlLG = {279,50,xmlLS,xmlLL};
344 
345 static const xmlChSRange xmlLlS[] = {{0x61, 0x7a}, {0xaa, 0xaa},
346     {0xb5, 0xb5}, {0xba, 0xba}, {0xdf, 0xf6}, {0xf8, 0xff}, {0x101, 0x101},
347     {0x103, 0x103}, {0x105, 0x105}, {0x107, 0x107}, {0x109, 0x109},
348     {0x10b, 0x10b}, {0x10d, 0x10d}, {0x10f, 0x10f}, {0x111, 0x111},
349     {0x113, 0x113}, {0x115, 0x115}, {0x117, 0x117}, {0x119, 0x119},
350     {0x11b, 0x11b}, {0x11d, 0x11d}, {0x11f, 0x11f}, {0x121, 0x121},
351     {0x123, 0x123}, {0x125, 0x125}, {0x127, 0x127}, {0x129, 0x129},
352     {0x12b, 0x12b}, {0x12d, 0x12d}, {0x12f, 0x12f}, {0x131, 0x131},
353     {0x133, 0x133}, {0x135, 0x135}, {0x137, 0x138}, {0x13a, 0x13a},
354     {0x13c, 0x13c}, {0x13e, 0x13e}, {0x140, 0x140}, {0x142, 0x142},
355     {0x144, 0x144}, {0x146, 0x146}, {0x148, 0x149}, {0x14b, 0x14b},
356     {0x14d, 0x14d}, {0x14f, 0x14f}, {0x151, 0x151}, {0x153, 0x153},
357     {0x155, 0x155}, {0x157, 0x157}, {0x159, 0x159}, {0x15b, 0x15b},
358     {0x15d, 0x15d}, {0x15f, 0x15f}, {0x161, 0x161}, {0x163, 0x163},
359     {0x165, 0x165}, {0x167, 0x167}, {0x169, 0x169}, {0x16b, 0x16b},
360     {0x16d, 0x16d}, {0x16f, 0x16f}, {0x171, 0x171}, {0x173, 0x173},
361     {0x175, 0x175}, {0x177, 0x177}, {0x17a, 0x17a}, {0x17c, 0x17c},
362     {0x17e, 0x180}, {0x183, 0x183}, {0x185, 0x185}, {0x188, 0x188},
363     {0x18c, 0x18d}, {0x192, 0x192}, {0x195, 0x195}, {0x199, 0x19b},
364     {0x19e, 0x19e}, {0x1a1, 0x1a1}, {0x1a3, 0x1a3}, {0x1a5, 0x1a5},
365     {0x1a8, 0x1a8}, {0x1aa, 0x1ab}, {0x1ad, 0x1ad}, {0x1b0, 0x1b0},
366     {0x1b4, 0x1b4}, {0x1b6, 0x1b6}, {0x1b9, 0x1ba}, {0x1bd, 0x1bf},
367     {0x1c6, 0x1c6}, {0x1c9, 0x1c9}, {0x1cc, 0x1cc}, {0x1ce, 0x1ce},
368     {0x1d0, 0x1d0}, {0x1d2, 0x1d2}, {0x1d4, 0x1d4}, {0x1d6, 0x1d6},
369     {0x1d8, 0x1d8}, {0x1da, 0x1da}, {0x1dc, 0x1dd}, {0x1df, 0x1df},
370     {0x1e1, 0x1e1}, {0x1e3, 0x1e3}, {0x1e5, 0x1e5}, {0x1e7, 0x1e7},
371     {0x1e9, 0x1e9}, {0x1eb, 0x1eb}, {0x1ed, 0x1ed}, {0x1ef, 0x1f0},
372     {0x1f3, 0x1f3}, {0x1f5, 0x1f5}, {0x1f9, 0x1f9}, {0x1fb, 0x1fb},
373     {0x1fd, 0x1fd}, {0x1ff, 0x1ff}, {0x201, 0x201}, {0x203, 0x203},
374     {0x205, 0x205}, {0x207, 0x207}, {0x209, 0x209}, {0x20b, 0x20b},
375     {0x20d, 0x20d}, {0x20f, 0x20f}, {0x211, 0x211}, {0x213, 0x213},
376     {0x215, 0x215}, {0x217, 0x217}, {0x219, 0x219}, {0x21b, 0x21b},
377     {0x21d, 0x21d}, {0x21f, 0x21f}, {0x221, 0x221}, {0x223, 0x223},
378     {0x225, 0x225}, {0x227, 0x227}, {0x229, 0x229}, {0x22b, 0x22b},
379     {0x22d, 0x22d}, {0x22f, 0x22f}, {0x231, 0x231}, {0x233, 0x236},
380     {0x250, 0x2af}, {0x390, 0x390}, {0x3ac, 0x3ce}, {0x3d0, 0x3d1},
381     {0x3d5, 0x3d7}, {0x3d9, 0x3d9}, {0x3db, 0x3db}, {0x3dd, 0x3dd},
382     {0x3df, 0x3df}, {0x3e1, 0x3e1}, {0x3e3, 0x3e3}, {0x3e5, 0x3e5},
383     {0x3e7, 0x3e7}, {0x3e9, 0x3e9}, {0x3eb, 0x3eb}, {0x3ed, 0x3ed},
384     {0x3ef, 0x3f3}, {0x3f5, 0x3f5}, {0x3f8, 0x3f8}, {0x3fb, 0x3fb},
385     {0x430, 0x45f}, {0x461, 0x461}, {0x463, 0x463}, {0x465, 0x465},
386     {0x467, 0x467}, {0x469, 0x469}, {0x46b, 0x46b}, {0x46d, 0x46d},
387     {0x46f, 0x46f}, {0x471, 0x471}, {0x473, 0x473}, {0x475, 0x475},
388     {0x477, 0x477}, {0x479, 0x479}, {0x47b, 0x47b}, {0x47d, 0x47d},
389     {0x47f, 0x47f}, {0x481, 0x481}, {0x48b, 0x48b}, {0x48d, 0x48d},
390     {0x48f, 0x48f}, {0x491, 0x491}, {0x493, 0x493}, {0x495, 0x495},
391     {0x497, 0x497}, {0x499, 0x499}, {0x49b, 0x49b}, {0x49d, 0x49d},
392     {0x49f, 0x49f}, {0x4a1, 0x4a1}, {0x4a3, 0x4a3}, {0x4a5, 0x4a5},
393     {0x4a7, 0x4a7}, {0x4a9, 0x4a9}, {0x4ab, 0x4ab}, {0x4ad, 0x4ad},
394     {0x4af, 0x4af}, {0x4b1, 0x4b1}, {0x4b3, 0x4b3}, {0x4b5, 0x4b5},
395     {0x4b7, 0x4b7}, {0x4b9, 0x4b9}, {0x4bb, 0x4bb}, {0x4bd, 0x4bd},
396     {0x4bf, 0x4bf}, {0x4c2, 0x4c2}, {0x4c4, 0x4c4}, {0x4c6, 0x4c6},
397     {0x4c8, 0x4c8}, {0x4ca, 0x4ca}, {0x4cc, 0x4cc}, {0x4ce, 0x4ce},
398     {0x4d1, 0x4d1}, {0x4d3, 0x4d3}, {0x4d5, 0x4d5}, {0x4d7, 0x4d7},
399     {0x4d9, 0x4d9}, {0x4db, 0x4db}, {0x4dd, 0x4dd}, {0x4df, 0x4df},
400     {0x4e1, 0x4e1}, {0x4e3, 0x4e3}, {0x4e5, 0x4e5}, {0x4e7, 0x4e7},
401     {0x4e9, 0x4e9}, {0x4eb, 0x4eb}, {0x4ed, 0x4ed}, {0x4ef, 0x4ef},
402     {0x4f1, 0x4f1}, {0x4f3, 0x4f3}, {0x4f5, 0x4f5}, {0x4f9, 0x4f9},
403     {0x501, 0x501}, {0x503, 0x503}, {0x505, 0x505}, {0x507, 0x507},
404     {0x509, 0x509}, {0x50b, 0x50b}, {0x50d, 0x50d}, {0x50f, 0x50f},
405     {0x561, 0x587}, {0x1d00, 0x1d2b}, {0x1d62, 0x1d6b}, {0x1e01, 0x1e01},
406     {0x1e03, 0x1e03}, {0x1e05, 0x1e05}, {0x1e07, 0x1e07}, {0x1e09, 0x1e09},
407     {0x1e0b, 0x1e0b}, {0x1e0d, 0x1e0d}, {0x1e0f, 0x1e0f}, {0x1e11, 0x1e11},
408     {0x1e13, 0x1e13}, {0x1e15, 0x1e15}, {0x1e17, 0x1e17}, {0x1e19, 0x1e19},
409     {0x1e1b, 0x1e1b}, {0x1e1d, 0x1e1d}, {0x1e1f, 0x1e1f}, {0x1e21, 0x1e21},
410     {0x1e23, 0x1e23}, {0x1e25, 0x1e25}, {0x1e27, 0x1e27}, {0x1e29, 0x1e29},
411     {0x1e2b, 0x1e2b}, {0x1e2d, 0x1e2d}, {0x1e2f, 0x1e2f}, {0x1e31, 0x1e31},
412     {0x1e33, 0x1e33}, {0x1e35, 0x1e35}, {0x1e37, 0x1e37}, {0x1e39, 0x1e39},
413     {0x1e3b, 0x1e3b}, {0x1e3d, 0x1e3d}, {0x1e3f, 0x1e3f}, {0x1e41, 0x1e41},
414     {0x1e43, 0x1e43}, {0x1e45, 0x1e45}, {0x1e47, 0x1e47}, {0x1e49, 0x1e49},
415     {0x1e4b, 0x1e4b}, {0x1e4d, 0x1e4d}, {0x1e4f, 0x1e4f}, {0x1e51, 0x1e51},
416     {0x1e53, 0x1e53}, {0x1e55, 0x1e55}, {0x1e57, 0x1e57}, {0x1e59, 0x1e59},
417     {0x1e5b, 0x1e5b}, {0x1e5d, 0x1e5d}, {0x1e5f, 0x1e5f}, {0x1e61, 0x1e61},
418     {0x1e63, 0x1e63}, {0x1e65, 0x1e65}, {0x1e67, 0x1e67}, {0x1e69, 0x1e69},
419     {0x1e6b, 0x1e6b}, {0x1e6d, 0x1e6d}, {0x1e6f, 0x1e6f}, {0x1e71, 0x1e71},
420     {0x1e73, 0x1e73}, {0x1e75, 0x1e75}, {0x1e77, 0x1e77}, {0x1e79, 0x1e79},
421     {0x1e7b, 0x1e7b}, {0x1e7d, 0x1e7d}, {0x1e7f, 0x1e7f}, {0x1e81, 0x1e81},
422     {0x1e83, 0x1e83}, {0x1e85, 0x1e85}, {0x1e87, 0x1e87}, {0x1e89, 0x1e89},
423     {0x1e8b, 0x1e8b}, {0x1e8d, 0x1e8d}, {0x1e8f, 0x1e8f}, {0x1e91, 0x1e91},
424     {0x1e93, 0x1e93}, {0x1e95, 0x1e9b}, {0x1ea1, 0x1ea1}, {0x1ea3, 0x1ea3},
425     {0x1ea5, 0x1ea5}, {0x1ea7, 0x1ea7}, {0x1ea9, 0x1ea9}, {0x1eab, 0x1eab},
426     {0x1ead, 0x1ead}, {0x1eaf, 0x1eaf}, {0x1eb1, 0x1eb1}, {0x1eb3, 0x1eb3},
427     {0x1eb5, 0x1eb5}, {0x1eb7, 0x1eb7}, {0x1eb9, 0x1eb9}, {0x1ebb, 0x1ebb},
428     {0x1ebd, 0x1ebd}, {0x1ebf, 0x1ebf}, {0x1ec1, 0x1ec1}, {0x1ec3, 0x1ec3},
429     {0x1ec5, 0x1ec5}, {0x1ec7, 0x1ec7}, {0x1ec9, 0x1ec9}, {0x1ecb, 0x1ecb},
430     {0x1ecd, 0x1ecd}, {0x1ecf, 0x1ecf}, {0x1ed1, 0x1ed1}, {0x1ed3, 0x1ed3},
431     {0x1ed5, 0x1ed5}, {0x1ed7, 0x1ed7}, {0x1ed9, 0x1ed9}, {0x1edb, 0x1edb},
432     {0x1edd, 0x1edd}, {0x1edf, 0x1edf}, {0x1ee1, 0x1ee1}, {0x1ee3, 0x1ee3},
433     {0x1ee5, 0x1ee5}, {0x1ee7, 0x1ee7}, {0x1ee9, 0x1ee9}, {0x1eeb, 0x1eeb},
434     {0x1eed, 0x1eed}, {0x1eef, 0x1eef}, {0x1ef1, 0x1ef1}, {0x1ef3, 0x1ef3},
435     {0x1ef5, 0x1ef5}, {0x1ef7, 0x1ef7}, {0x1ef9, 0x1ef9}, {0x1f00, 0x1f07},
436     {0x1f10, 0x1f15}, {0x1f20, 0x1f27}, {0x1f30, 0x1f37}, {0x1f40, 0x1f45},
437     {0x1f50, 0x1f57}, {0x1f60, 0x1f67}, {0x1f70, 0x1f7d}, {0x1f80, 0x1f87},
438     {0x1f90, 0x1f97}, {0x1fa0, 0x1fa7}, {0x1fb0, 0x1fb4}, {0x1fb6, 0x1fb7},
439     {0x1fbe, 0x1fbe}, {0x1fc2, 0x1fc4}, {0x1fc6, 0x1fc7}, {0x1fd0, 0x1fd3},
440     {0x1fd6, 0x1fd7}, {0x1fe0, 0x1fe7}, {0x1ff2, 0x1ff4}, {0x1ff6, 0x1ff7},
441     {0x2071, 0x2071}, {0x207f, 0x207f}, {0x210a, 0x210a}, {0x210e, 0x210f},
442     {0x2113, 0x2113}, {0x212f, 0x212f}, {0x2134, 0x2134}, {0x2139, 0x2139},
443     {0x213d, 0x213d}, {0x2146, 0x2149}, {0xfb00, 0xfb06}, {0xfb13, 0xfb17},
444     {0xff41, 0xff5a} };
445 static const xmlChLRange xmlLlL[] = {{0x10428, 0x1044f}, {0x1d41a, 0x1d433},
446     {0x1d44e, 0x1d454}, {0x1d456, 0x1d467}, {0x1d482, 0x1d49b},
447     {0x1d4b6, 0x1d4b9}, {0x1d4bb, 0x1d4bb}, {0x1d4bd, 0x1d4c3},
448     {0x1d4c5, 0x1d4cf}, {0x1d4ea, 0x1d503}, {0x1d51e, 0x1d537},
449     {0x1d552, 0x1d56b}, {0x1d586, 0x1d59f}, {0x1d5ba, 0x1d5d3},
450     {0x1d5ee, 0x1d607}, {0x1d622, 0x1d63b}, {0x1d656, 0x1d66f},
451     {0x1d68a, 0x1d6a3}, {0x1d6c2, 0x1d6da}, {0x1d6dc, 0x1d6e1},
452     {0x1d6fc, 0x1d714}, {0x1d716, 0x1d71b}, {0x1d736, 0x1d74e},
453     {0x1d750, 0x1d755}, {0x1d770, 0x1d788}, {0x1d78a, 0x1d78f},
454     {0x1d7aa, 0x1d7c2}, {0x1d7c4, 0x1d7c9} };
455 static xmlChRangeGroup xmlLlG = {396,28,xmlLlS,xmlLlL};
456 
457 static const xmlChSRange xmlLmS[] = {{0x2b0, 0x2c1}, {0x2c6, 0x2d1},
458     {0x2e0, 0x2e4}, {0x2ee, 0x2ee}, {0x37a, 0x37a}, {0x559, 0x559},
459     {0x640, 0x640}, {0x6e5, 0x6e6}, {0xe46, 0xe46}, {0xec6, 0xec6},
460     {0x17d7, 0x17d7}, {0x1843, 0x1843}, {0x1d2c, 0x1d61}, {0x3005, 0x3005},
461     {0x3031, 0x3035}, {0x303b, 0x303b}, {0x309d, 0x309e}, {0x30fc, 0x30fe},
462     {0xff70, 0xff70}, {0xff9e, 0xff9f} };
463 static xmlChRangeGroup xmlLmG = {20,0,xmlLmS,NULL};
464 
465 static const xmlChSRange xmlLoS[] = {{0x1bb, 0x1bb}, {0x1c0, 0x1c3},
466     {0x5d0, 0x5ea}, {0x5f0, 0x5f2}, {0x621, 0x63a}, {0x641, 0x64a},
467     {0x66e, 0x66f}, {0x671, 0x6d3}, {0x6d5, 0x6d5}, {0x6ee, 0x6ef},
468     {0x6fa, 0x6fc}, {0x6ff, 0x6ff}, {0x710, 0x710}, {0x712, 0x72f},
469     {0x74d, 0x74f}, {0x780, 0x7a5}, {0x7b1, 0x7b1}, {0x904, 0x939},
470     {0x93d, 0x93d}, {0x950, 0x950}, {0x958, 0x961}, {0x985, 0x98c},
471     {0x98f, 0x990}, {0x993, 0x9a8}, {0x9aa, 0x9b0}, {0x9b2, 0x9b2},
472     {0x9b6, 0x9b9}, {0x9bd, 0x9bd}, {0x9dc, 0x9dd}, {0x9df, 0x9e1},
473     {0x9f0, 0x9f1}, {0xa05, 0xa0a}, {0xa0f, 0xa10}, {0xa13, 0xa28},
474     {0xa2a, 0xa30}, {0xa32, 0xa33}, {0xa35, 0xa36}, {0xa38, 0xa39},
475     {0xa59, 0xa5c}, {0xa5e, 0xa5e}, {0xa72, 0xa74}, {0xa85, 0xa8d},
476     {0xa8f, 0xa91}, {0xa93, 0xaa8}, {0xaaa, 0xab0}, {0xab2, 0xab3},
477     {0xab5, 0xab9}, {0xabd, 0xabd}, {0xad0, 0xad0}, {0xae0, 0xae1},
478     {0xb05, 0xb0c}, {0xb0f, 0xb10}, {0xb13, 0xb28}, {0xb2a, 0xb30},
479     {0xb32, 0xb33}, {0xb35, 0xb39}, {0xb3d, 0xb3d}, {0xb5c, 0xb5d},
480     {0xb5f, 0xb61}, {0xb71, 0xb71}, {0xb83, 0xb83}, {0xb85, 0xb8a},
481     {0xb8e, 0xb90}, {0xb92, 0xb95}, {0xb99, 0xb9a}, {0xb9c, 0xb9c},
482     {0xb9e, 0xb9f}, {0xba3, 0xba4}, {0xba8, 0xbaa}, {0xbae, 0xbb5},
483     {0xbb7, 0xbb9}, {0xc05, 0xc0c}, {0xc0e, 0xc10}, {0xc12, 0xc28},
484     {0xc2a, 0xc33}, {0xc35, 0xc39}, {0xc60, 0xc61}, {0xc85, 0xc8c},
485     {0xc8e, 0xc90}, {0xc92, 0xca8}, {0xcaa, 0xcb3}, {0xcb5, 0xcb9},
486     {0xcbd, 0xcbd}, {0xcde, 0xcde}, {0xce0, 0xce1}, {0xd05, 0xd0c},
487     {0xd0e, 0xd10}, {0xd12, 0xd28}, {0xd2a, 0xd39}, {0xd60, 0xd61},
488     {0xd85, 0xd96}, {0xd9a, 0xdb1}, {0xdb3, 0xdbb}, {0xdbd, 0xdbd},
489     {0xdc0, 0xdc6}, {0xe01, 0xe30}, {0xe32, 0xe33}, {0xe40, 0xe45},
490     {0xe81, 0xe82}, {0xe84, 0xe84}, {0xe87, 0xe88}, {0xe8a, 0xe8a},
491     {0xe8d, 0xe8d}, {0xe94, 0xe97}, {0xe99, 0xe9f}, {0xea1, 0xea3},
492     {0xea5, 0xea5}, {0xea7, 0xea7}, {0xeaa, 0xeab}, {0xead, 0xeb0},
493     {0xeb2, 0xeb3}, {0xebd, 0xebd}, {0xec0, 0xec4}, {0xedc, 0xedd},
494     {0xf00, 0xf00}, {0xf40, 0xf47}, {0xf49, 0xf6a}, {0xf88, 0xf8b},
495     {0x1000, 0x1021}, {0x1023, 0x1027}, {0x1029, 0x102a}, {0x1050, 0x1055},
496     {0x10d0, 0x10f8}, {0x1100, 0x1159}, {0x115f, 0x11a2}, {0x11a8, 0x11f9},
497     {0x1200, 0x1206}, {0x1208, 0x1246}, {0x1248, 0x1248}, {0x124a, 0x124d},
498     {0x1250, 0x1256}, {0x1258, 0x1258}, {0x125a, 0x125d}, {0x1260, 0x1286},
499     {0x1288, 0x1288}, {0x128a, 0x128d}, {0x1290, 0x12ae}, {0x12b0, 0x12b0},
500     {0x12b2, 0x12b5}, {0x12b8, 0x12be}, {0x12c0, 0x12c0}, {0x12c2, 0x12c5},
501     {0x12c8, 0x12ce}, {0x12d0, 0x12d6}, {0x12d8, 0x12ee}, {0x12f0, 0x130e},
502     {0x1310, 0x1310}, {0x1312, 0x1315}, {0x1318, 0x131e}, {0x1320, 0x1346},
503     {0x1348, 0x135a}, {0x13a0, 0x13f4}, {0x1401, 0x166c}, {0x166f, 0x1676},
504     {0x1681, 0x169a}, {0x16a0, 0x16ea}, {0x1700, 0x170c}, {0x170e, 0x1711},
505     {0x1720, 0x1731}, {0x1740, 0x1751}, {0x1760, 0x176c}, {0x176e, 0x1770},
506     {0x1780, 0x17b3}, {0x17dc, 0x17dc}, {0x1820, 0x1842}, {0x1844, 0x1877},
507     {0x1880, 0x18a8}, {0x1900, 0x191c}, {0x1950, 0x196d}, {0x1970, 0x1974},
508     {0x2135, 0x2138}, {0x3006, 0x3006}, {0x303c, 0x303c}, {0x3041, 0x3096},
509     {0x309f, 0x309f}, {0x30a1, 0x30fa}, {0x30ff, 0x30ff}, {0x3105, 0x312c},
510     {0x3131, 0x318e}, {0x31a0, 0x31b7}, {0x31f0, 0x31ff}, {0x3400, 0x3400},
511     {0x4db5, 0x4db5}, {0x4e00, 0x4e00}, {0x9fa5, 0x9fa5}, {0xa000, 0xa48c},
512     {0xac00, 0xac00}, {0xd7a3, 0xd7a3}, {0xf900, 0xfa2d}, {0xfa30, 0xfa6a},
513     {0xfb1d, 0xfb1d}, {0xfb1f, 0xfb28}, {0xfb2a, 0xfb36}, {0xfb38, 0xfb3c},
514     {0xfb3e, 0xfb3e}, {0xfb40, 0xfb41}, {0xfb43, 0xfb44}, {0xfb46, 0xfbb1},
515     {0xfbd3, 0xfd3d}, {0xfd50, 0xfd8f}, {0xfd92, 0xfdc7}, {0xfdf0, 0xfdfb},
516     {0xfe70, 0xfe74}, {0xfe76, 0xfefc}, {0xff66, 0xff6f}, {0xff71, 0xff9d},
517     {0xffa0, 0xffbe}, {0xffc2, 0xffc7}, {0xffca, 0xffcf}, {0xffd2, 0xffd7},
518     {0xffda, 0xffdc} };
519 static const xmlChLRange xmlLoL[] = {{0x10000, 0x1000b}, {0x1000d, 0x10026},
520     {0x10028, 0x1003a}, {0x1003c, 0x1003d}, {0x1003f, 0x1004d},
521     {0x10050, 0x1005d}, {0x10080, 0x100fa}, {0x10300, 0x1031e},
522     {0x10330, 0x10349}, {0x10380, 0x1039d}, {0x10450, 0x1049d},
523     {0x10800, 0x10805}, {0x10808, 0x10808}, {0x1080a, 0x10835},
524     {0x10837, 0x10838}, {0x1083c, 0x1083c}, {0x1083f, 0x1083f},
525     {0x20000, 0x20000}, {0x2a6d6, 0x2a6d6}, {0x2f800, 0x2fa1d} };
526 static xmlChRangeGroup xmlLoG = {211,20,xmlLoS,xmlLoL};
527 
528 static const xmlChSRange xmlLtS[] = {{0x1c5, 0x1c5}, {0x1c8, 0x1c8},
529     {0x1cb, 0x1cb}, {0x1f2, 0x1f2}, {0x1f88, 0x1f8f}, {0x1f98, 0x1f9f},
530     {0x1fa8, 0x1faf}, {0x1fbc, 0x1fbc}, {0x1fcc, 0x1fcc}, {0x1ffc, 0x1ffc} };
531 static xmlChRangeGroup xmlLtG = {10,0,xmlLtS,NULL};
532 
533 static const xmlChSRange xmlLuS[] = {{0x41, 0x5a}, {0xc0, 0xd6},
534     {0xd8, 0xde}, {0x100, 0x100}, {0x102, 0x102}, {0x104, 0x104},
535     {0x106, 0x106}, {0x108, 0x108}, {0x10a, 0x10a}, {0x10c, 0x10c},
536     {0x10e, 0x10e}, {0x110, 0x110}, {0x112, 0x112}, {0x114, 0x114},
537     {0x116, 0x116}, {0x118, 0x118}, {0x11a, 0x11a}, {0x11c, 0x11c},
538     {0x11e, 0x11e}, {0x120, 0x120}, {0x122, 0x122}, {0x124, 0x124},
539     {0x126, 0x126}, {0x128, 0x128}, {0x12a, 0x12a}, {0x12c, 0x12c},
540     {0x12e, 0x12e}, {0x130, 0x130}, {0x132, 0x132}, {0x134, 0x134},
541     {0x136, 0x136}, {0x139, 0x139}, {0x13b, 0x13b}, {0x13d, 0x13d},
542     {0x13f, 0x13f}, {0x141, 0x141}, {0x143, 0x143}, {0x145, 0x145},
543     {0x147, 0x147}, {0x14a, 0x14a}, {0x14c, 0x14c}, {0x14e, 0x14e},
544     {0x150, 0x150}, {0x152, 0x152}, {0x154, 0x154}, {0x156, 0x156},
545     {0x158, 0x158}, {0x15a, 0x15a}, {0x15c, 0x15c}, {0x15e, 0x15e},
546     {0x160, 0x160}, {0x162, 0x162}, {0x164, 0x164}, {0x166, 0x166},
547     {0x168, 0x168}, {0x16a, 0x16a}, {0x16c, 0x16c}, {0x16e, 0x16e},
548     {0x170, 0x170}, {0x172, 0x172}, {0x174, 0x174}, {0x176, 0x176},
549     {0x178, 0x179}, {0x17b, 0x17b}, {0x17d, 0x17d}, {0x181, 0x182},
550     {0x184, 0x184}, {0x186, 0x187}, {0x189, 0x18b}, {0x18e, 0x191},
551     {0x193, 0x194}, {0x196, 0x198}, {0x19c, 0x19d}, {0x19f, 0x1a0},
552     {0x1a2, 0x1a2}, {0x1a4, 0x1a4}, {0x1a6, 0x1a7}, {0x1a9, 0x1a9},
553     {0x1ac, 0x1ac}, {0x1ae, 0x1af}, {0x1b1, 0x1b3}, {0x1b5, 0x1b5},
554     {0x1b7, 0x1b8}, {0x1bc, 0x1bc}, {0x1c4, 0x1c4}, {0x1c7, 0x1c7},
555     {0x1ca, 0x1ca}, {0x1cd, 0x1cd}, {0x1cf, 0x1cf}, {0x1d1, 0x1d1},
556     {0x1d3, 0x1d3}, {0x1d5, 0x1d5}, {0x1d7, 0x1d7}, {0x1d9, 0x1d9},
557     {0x1db, 0x1db}, {0x1de, 0x1de}, {0x1e0, 0x1e0}, {0x1e2, 0x1e2},
558     {0x1e4, 0x1e4}, {0x1e6, 0x1e6}, {0x1e8, 0x1e8}, {0x1ea, 0x1ea},
559     {0x1ec, 0x1ec}, {0x1ee, 0x1ee}, {0x1f1, 0x1f1}, {0x1f4, 0x1f4},
560     {0x1f6, 0x1f8}, {0x1fa, 0x1fa}, {0x1fc, 0x1fc}, {0x1fe, 0x1fe},
561     {0x200, 0x200}, {0x202, 0x202}, {0x204, 0x204}, {0x206, 0x206},
562     {0x208, 0x208}, {0x20a, 0x20a}, {0x20c, 0x20c}, {0x20e, 0x20e},
563     {0x210, 0x210}, {0x212, 0x212}, {0x214, 0x214}, {0x216, 0x216},
564     {0x218, 0x218}, {0x21a, 0x21a}, {0x21c, 0x21c}, {0x21e, 0x21e},
565     {0x220, 0x220}, {0x222, 0x222}, {0x224, 0x224}, {0x226, 0x226},
566     {0x228, 0x228}, {0x22a, 0x22a}, {0x22c, 0x22c}, {0x22e, 0x22e},
567     {0x230, 0x230}, {0x232, 0x232}, {0x386, 0x386}, {0x388, 0x38a},
568     {0x38c, 0x38c}, {0x38e, 0x38f}, {0x391, 0x3a1}, {0x3a3, 0x3ab},
569     {0x3d2, 0x3d4}, {0x3d8, 0x3d8}, {0x3da, 0x3da}, {0x3dc, 0x3dc},
570     {0x3de, 0x3de}, {0x3e0, 0x3e0}, {0x3e2, 0x3e2}, {0x3e4, 0x3e4},
571     {0x3e6, 0x3e6}, {0x3e8, 0x3e8}, {0x3ea, 0x3ea}, {0x3ec, 0x3ec},
572     {0x3ee, 0x3ee}, {0x3f4, 0x3f4}, {0x3f7, 0x3f7}, {0x3f9, 0x3fa},
573     {0x400, 0x42f}, {0x460, 0x460}, {0x462, 0x462}, {0x464, 0x464},
574     {0x466, 0x466}, {0x468, 0x468}, {0x46a, 0x46a}, {0x46c, 0x46c},
575     {0x46e, 0x46e}, {0x470, 0x470}, {0x472, 0x472}, {0x474, 0x474},
576     {0x476, 0x476}, {0x478, 0x478}, {0x47a, 0x47a}, {0x47c, 0x47c},
577     {0x47e, 0x47e}, {0x480, 0x480}, {0x48a, 0x48a}, {0x48c, 0x48c},
578     {0x48e, 0x48e}, {0x490, 0x490}, {0x492, 0x492}, {0x494, 0x494},
579     {0x496, 0x496}, {0x498, 0x498}, {0x49a, 0x49a}, {0x49c, 0x49c},
580     {0x49e, 0x49e}, {0x4a0, 0x4a0}, {0x4a2, 0x4a2}, {0x4a4, 0x4a4},
581     {0x4a6, 0x4a6}, {0x4a8, 0x4a8}, {0x4aa, 0x4aa}, {0x4ac, 0x4ac},
582     {0x4ae, 0x4ae}, {0x4b0, 0x4b0}, {0x4b2, 0x4b2}, {0x4b4, 0x4b4},
583     {0x4b6, 0x4b6}, {0x4b8, 0x4b8}, {0x4ba, 0x4ba}, {0x4bc, 0x4bc},
584     {0x4be, 0x4be}, {0x4c0, 0x4c1}, {0x4c3, 0x4c3}, {0x4c5, 0x4c5},
585     {0x4c7, 0x4c7}, {0x4c9, 0x4c9}, {0x4cb, 0x4cb}, {0x4cd, 0x4cd},
586     {0x4d0, 0x4d0}, {0x4d2, 0x4d2}, {0x4d4, 0x4d4}, {0x4d6, 0x4d6},
587     {0x4d8, 0x4d8}, {0x4da, 0x4da}, {0x4dc, 0x4dc}, {0x4de, 0x4de},
588     {0x4e0, 0x4e0}, {0x4e2, 0x4e2}, {0x4e4, 0x4e4}, {0x4e6, 0x4e6},
589     {0x4e8, 0x4e8}, {0x4ea, 0x4ea}, {0x4ec, 0x4ec}, {0x4ee, 0x4ee},
590     {0x4f0, 0x4f0}, {0x4f2, 0x4f2}, {0x4f4, 0x4f4}, {0x4f8, 0x4f8},
591     {0x500, 0x500}, {0x502, 0x502}, {0x504, 0x504}, {0x506, 0x506},
592     {0x508, 0x508}, {0x50a, 0x50a}, {0x50c, 0x50c}, {0x50e, 0x50e},
593     {0x531, 0x556}, {0x10a0, 0x10c5}, {0x1e00, 0x1e00}, {0x1e02, 0x1e02},
594     {0x1e04, 0x1e04}, {0x1e06, 0x1e06}, {0x1e08, 0x1e08}, {0x1e0a, 0x1e0a},
595     {0x1e0c, 0x1e0c}, {0x1e0e, 0x1e0e}, {0x1e10, 0x1e10}, {0x1e12, 0x1e12},
596     {0x1e14, 0x1e14}, {0x1e16, 0x1e16}, {0x1e18, 0x1e18}, {0x1e1a, 0x1e1a},
597     {0x1e1c, 0x1e1c}, {0x1e1e, 0x1e1e}, {0x1e20, 0x1e20}, {0x1e22, 0x1e22},
598     {0x1e24, 0x1e24}, {0x1e26, 0x1e26}, {0x1e28, 0x1e28}, {0x1e2a, 0x1e2a},
599     {0x1e2c, 0x1e2c}, {0x1e2e, 0x1e2e}, {0x1e30, 0x1e30}, {0x1e32, 0x1e32},
600     {0x1e34, 0x1e34}, {0x1e36, 0x1e36}, {0x1e38, 0x1e38}, {0x1e3a, 0x1e3a},
601     {0x1e3c, 0x1e3c}, {0x1e3e, 0x1e3e}, {0x1e40, 0x1e40}, {0x1e42, 0x1e42},
602     {0x1e44, 0x1e44}, {0x1e46, 0x1e46}, {0x1e48, 0x1e48}, {0x1e4a, 0x1e4a},
603     {0x1e4c, 0x1e4c}, {0x1e4e, 0x1e4e}, {0x1e50, 0x1e50}, {0x1e52, 0x1e52},
604     {0x1e54, 0x1e54}, {0x1e56, 0x1e56}, {0x1e58, 0x1e58}, {0x1e5a, 0x1e5a},
605     {0x1e5c, 0x1e5c}, {0x1e5e, 0x1e5e}, {0x1e60, 0x1e60}, {0x1e62, 0x1e62},
606     {0x1e64, 0x1e64}, {0x1e66, 0x1e66}, {0x1e68, 0x1e68}, {0x1e6a, 0x1e6a},
607     {0x1e6c, 0x1e6c}, {0x1e6e, 0x1e6e}, {0x1e70, 0x1e70}, {0x1e72, 0x1e72},
608     {0x1e74, 0x1e74}, {0x1e76, 0x1e76}, {0x1e78, 0x1e78}, {0x1e7a, 0x1e7a},
609     {0x1e7c, 0x1e7c}, {0x1e7e, 0x1e7e}, {0x1e80, 0x1e80}, {0x1e82, 0x1e82},
610     {0x1e84, 0x1e84}, {0x1e86, 0x1e86}, {0x1e88, 0x1e88}, {0x1e8a, 0x1e8a},
611     {0x1e8c, 0x1e8c}, {0x1e8e, 0x1e8e}, {0x1e90, 0x1e90}, {0x1e92, 0x1e92},
612     {0x1e94, 0x1e94}, {0x1ea0, 0x1ea0}, {0x1ea2, 0x1ea2}, {0x1ea4, 0x1ea4},
613     {0x1ea6, 0x1ea6}, {0x1ea8, 0x1ea8}, {0x1eaa, 0x1eaa}, {0x1eac, 0x1eac},
614     {0x1eae, 0x1eae}, {0x1eb0, 0x1eb0}, {0x1eb2, 0x1eb2}, {0x1eb4, 0x1eb4},
615     {0x1eb6, 0x1eb6}, {0x1eb8, 0x1eb8}, {0x1eba, 0x1eba}, {0x1ebc, 0x1ebc},
616     {0x1ebe, 0x1ebe}, {0x1ec0, 0x1ec0}, {0x1ec2, 0x1ec2}, {0x1ec4, 0x1ec4},
617     {0x1ec6, 0x1ec6}, {0x1ec8, 0x1ec8}, {0x1eca, 0x1eca}, {0x1ecc, 0x1ecc},
618     {0x1ece, 0x1ece}, {0x1ed0, 0x1ed0}, {0x1ed2, 0x1ed2}, {0x1ed4, 0x1ed4},
619     {0x1ed6, 0x1ed6}, {0x1ed8, 0x1ed8}, {0x1eda, 0x1eda}, {0x1edc, 0x1edc},
620     {0x1ede, 0x1ede}, {0x1ee0, 0x1ee0}, {0x1ee2, 0x1ee2}, {0x1ee4, 0x1ee4},
621     {0x1ee6, 0x1ee6}, {0x1ee8, 0x1ee8}, {0x1eea, 0x1eea}, {0x1eec, 0x1eec},
622     {0x1eee, 0x1eee}, {0x1ef0, 0x1ef0}, {0x1ef2, 0x1ef2}, {0x1ef4, 0x1ef4},
623     {0x1ef6, 0x1ef6}, {0x1ef8, 0x1ef8}, {0x1f08, 0x1f0f}, {0x1f18, 0x1f1d},
624     {0x1f28, 0x1f2f}, {0x1f38, 0x1f3f}, {0x1f48, 0x1f4d}, {0x1f59, 0x1f59},
625     {0x1f5b, 0x1f5b}, {0x1f5d, 0x1f5d}, {0x1f5f, 0x1f5f}, {0x1f68, 0x1f6f},
626     {0x1fb8, 0x1fbb}, {0x1fc8, 0x1fcb}, {0x1fd8, 0x1fdb}, {0x1fe8, 0x1fec},
627     {0x1ff8, 0x1ffb}, {0x2102, 0x2102}, {0x2107, 0x2107}, {0x210b, 0x210d},
628     {0x2110, 0x2112}, {0x2115, 0x2115}, {0x2119, 0x211d}, {0x2124, 0x2124},
629     {0x2126, 0x2126}, {0x2128, 0x2128}, {0x212a, 0x212d}, {0x2130, 0x2131},
630     {0x2133, 0x2133}, {0x213e, 0x213f}, {0x2145, 0x2145}, {0xff21, 0xff3a} };
631 static const xmlChLRange xmlLuL[] = {{0x10400, 0x10427}, {0x1d400, 0x1d419},
632     {0x1d434, 0x1d44d}, {0x1d468, 0x1d481}, {0x1d49c, 0x1d49c},
633     {0x1d49e, 0x1d49f}, {0x1d4a2, 0x1d4a2}, {0x1d4a5, 0x1d4a6},
634     {0x1d4a9, 0x1d4ac}, {0x1d4ae, 0x1d4b5}, {0x1d4d0, 0x1d4e9},
635     {0x1d504, 0x1d505}, {0x1d507, 0x1d50a}, {0x1d50d, 0x1d514},
636     {0x1d516, 0x1d51c}, {0x1d538, 0x1d539}, {0x1d53b, 0x1d53e},
637     {0x1d540, 0x1d544}, {0x1d546, 0x1d546}, {0x1d54a, 0x1d550},
638     {0x1d56c, 0x1d585}, {0x1d5a0, 0x1d5b9}, {0x1d5d4, 0x1d5ed},
639     {0x1d608, 0x1d621}, {0x1d63c, 0x1d655}, {0x1d670, 0x1d689},
640     {0x1d6a8, 0x1d6c0}, {0x1d6e2, 0x1d6fa}, {0x1d71c, 0x1d734},
641     {0x1d756, 0x1d76e}, {0x1d790, 0x1d7a8} };
642 static xmlChRangeGroup xmlLuG = {390,31,xmlLuS,xmlLuL};
643 
644 static const xmlChSRange xmlMS[] = {{0x300, 0x357}, {0x35d, 0x36f},
645     {0x483, 0x486}, {0x488, 0x489}, {0x591, 0x5a1}, {0x5a3, 0x5b9},
646     {0x5bb, 0x5bd}, {0x5bf, 0x5bf}, {0x5c1, 0x5c2}, {0x5c4, 0x5c4},
647     {0x610, 0x615}, {0x64b, 0x658}, {0x670, 0x670}, {0x6d6, 0x6dc},
648     {0x6de, 0x6e4}, {0x6e7, 0x6e8}, {0x6ea, 0x6ed}, {0x711, 0x711},
649     {0x730, 0x74a}, {0x7a6, 0x7b0}, {0x901, 0x903}, {0x93c, 0x93c},
650     {0x93e, 0x94d}, {0x951, 0x954}, {0x962, 0x963}, {0x981, 0x983},
651     {0x9bc, 0x9bc}, {0x9be, 0x9c4}, {0x9c7, 0x9c8}, {0x9cb, 0x9cd},
652     {0x9d7, 0x9d7}, {0x9e2, 0x9e3}, {0xa01, 0xa03}, {0xa3c, 0xa3c},
653     {0xa3e, 0xa42}, {0xa47, 0xa48}, {0xa4b, 0xa4d}, {0xa70, 0xa71},
654     {0xa81, 0xa83}, {0xabc, 0xabc}, {0xabe, 0xac5}, {0xac7, 0xac9},
655     {0xacb, 0xacd}, {0xae2, 0xae3}, {0xb01, 0xb03}, {0xb3c, 0xb3c},
656     {0xb3e, 0xb43}, {0xb47, 0xb48}, {0xb4b, 0xb4d}, {0xb56, 0xb57},
657     {0xb82, 0xb82}, {0xbbe, 0xbc2}, {0xbc6, 0xbc8}, {0xbca, 0xbcd},
658     {0xbd7, 0xbd7}, {0xc01, 0xc03}, {0xc3e, 0xc44}, {0xc46, 0xc48},
659     {0xc4a, 0xc4d}, {0xc55, 0xc56}, {0xc82, 0xc83}, {0xcbc, 0xcbc},
660     {0xcbe, 0xcc4}, {0xcc6, 0xcc8}, {0xcca, 0xccd}, {0xcd5, 0xcd6},
661     {0xd02, 0xd03}, {0xd3e, 0xd43}, {0xd46, 0xd48}, {0xd4a, 0xd4d},
662     {0xd57, 0xd57}, {0xd82, 0xd83}, {0xdca, 0xdca}, {0xdcf, 0xdd4},
663     {0xdd6, 0xdd6}, {0xdd8, 0xddf}, {0xdf2, 0xdf3}, {0xe31, 0xe31},
664     {0xe34, 0xe3a}, {0xe47, 0xe4e}, {0xeb1, 0xeb1}, {0xeb4, 0xeb9},
665     {0xebb, 0xebc}, {0xec8, 0xecd}, {0xf18, 0xf19}, {0xf35, 0xf35},
666     {0xf37, 0xf37}, {0xf39, 0xf39}, {0xf3e, 0xf3f}, {0xf71, 0xf84},
667     {0xf86, 0xf87}, {0xf90, 0xf97}, {0xf99, 0xfbc}, {0xfc6, 0xfc6},
668     {0x102c, 0x1032}, {0x1036, 0x1039}, {0x1056, 0x1059}, {0x1712, 0x1714},
669     {0x1732, 0x1734}, {0x1752, 0x1753}, {0x1772, 0x1773}, {0x17b6, 0x17d3},
670     {0x17dd, 0x17dd}, {0x180b, 0x180d}, {0x18a9, 0x18a9}, {0x1920, 0x192b},
671     {0x1930, 0x193b}, {0x20d0, 0x20ea}, {0x302a, 0x302f}, {0x3099, 0x309a},
672     {0xfb1e, 0xfb1e}, {0xfe00, 0xfe0f}, {0xfe20, 0xfe23} };
673 static const xmlChLRange xmlML[] = {{0x1d165, 0x1d169}, {0x1d16d, 0x1d172},
674     {0x1d17b, 0x1d182}, {0x1d185, 0x1d18b}, {0x1d1aa, 0x1d1ad},
675     {0xe0100, 0xe01ef} };
676 static xmlChRangeGroup xmlMG = {113,6,xmlMS,xmlML};
677 
678 static const xmlChSRange xmlMcS[] = {{0x903, 0x903}, {0x93e, 0x940},
679     {0x949, 0x94c}, {0x982, 0x983}, {0x9be, 0x9c0}, {0x9c7, 0x9c8},
680     {0x9cb, 0x9cc}, {0x9d7, 0x9d7}, {0xa03, 0xa03}, {0xa3e, 0xa40},
681     {0xa83, 0xa83}, {0xabe, 0xac0}, {0xac9, 0xac9}, {0xacb, 0xacc},
682     {0xb02, 0xb03}, {0xb3e, 0xb3e}, {0xb40, 0xb40}, {0xb47, 0xb48},
683     {0xb4b, 0xb4c}, {0xb57, 0xb57}, {0xbbe, 0xbbf}, {0xbc1, 0xbc2},
684     {0xbc6, 0xbc8}, {0xbca, 0xbcc}, {0xbd7, 0xbd7}, {0xc01, 0xc03},
685     {0xc41, 0xc44}, {0xc82, 0xc83}, {0xcbe, 0xcbe}, {0xcc0, 0xcc4},
686     {0xcc7, 0xcc8}, {0xcca, 0xccb}, {0xcd5, 0xcd6}, {0xd02, 0xd03},
687     {0xd3e, 0xd40}, {0xd46, 0xd48}, {0xd4a, 0xd4c}, {0xd57, 0xd57},
688     {0xd82, 0xd83}, {0xdcf, 0xdd1}, {0xdd8, 0xddf}, {0xdf2, 0xdf3},
689     {0xf3e, 0xf3f}, {0xf7f, 0xf7f}, {0x102c, 0x102c}, {0x1031, 0x1031},
690     {0x1038, 0x1038}, {0x1056, 0x1057}, {0x17b6, 0x17b6}, {0x17be, 0x17c5},
691     {0x17c7, 0x17c8}, {0x1923, 0x1926}, {0x1929, 0x192b}, {0x1930, 0x1931},
692     {0x1933, 0x1938} };
693 static const xmlChLRange xmlMcL[] = {{0x1d165, 0x1d166}, {0x1d16d, 0x1d172} };
694 static xmlChRangeGroup xmlMcG = {55,2,xmlMcS,xmlMcL};
695 
696 static const xmlChSRange xmlMnS[] = {{0x300, 0x357}, {0x35d, 0x36f},
697     {0x483, 0x486}, {0x591, 0x5a1}, {0x5a3, 0x5b9}, {0x5bb, 0x5bd},
698     {0x5bf, 0x5bf}, {0x5c1, 0x5c2}, {0x5c4, 0x5c4}, {0x610, 0x615},
699     {0x64b, 0x658}, {0x670, 0x670}, {0x6d6, 0x6dc}, {0x6df, 0x6e4},
700     {0x6e7, 0x6e8}, {0x6ea, 0x6ed}, {0x711, 0x711}, {0x730, 0x74a},
701     {0x7a6, 0x7b0}, {0x901, 0x902}, {0x93c, 0x93c}, {0x941, 0x948},
702     {0x94d, 0x94d}, {0x951, 0x954}, {0x962, 0x963}, {0x981, 0x981},
703     {0x9bc, 0x9bc}, {0x9c1, 0x9c4}, {0x9cd, 0x9cd}, {0x9e2, 0x9e3},
704     {0xa01, 0xa02}, {0xa3c, 0xa3c}, {0xa41, 0xa42}, {0xa47, 0xa48},
705     {0xa4b, 0xa4d}, {0xa70, 0xa71}, {0xa81, 0xa82}, {0xabc, 0xabc},
706     {0xac1, 0xac5}, {0xac7, 0xac8}, {0xacd, 0xacd}, {0xae2, 0xae3},
707     {0xb01, 0xb01}, {0xb3c, 0xb3c}, {0xb3f, 0xb3f}, {0xb41, 0xb43},
708     {0xb4d, 0xb4d}, {0xb56, 0xb56}, {0xb82, 0xb82}, {0xbc0, 0xbc0},
709     {0xbcd, 0xbcd}, {0xc3e, 0xc40}, {0xc46, 0xc48}, {0xc4a, 0xc4d},
710     {0xc55, 0xc56}, {0xcbc, 0xcbc}, {0xcbf, 0xcbf}, {0xcc6, 0xcc6},
711     {0xccc, 0xccd}, {0xd41, 0xd43}, {0xd4d, 0xd4d}, {0xdca, 0xdca},
712     {0xdd2, 0xdd4}, {0xdd6, 0xdd6}, {0xe31, 0xe31}, {0xe34, 0xe3a},
713     {0xe47, 0xe4e}, {0xeb1, 0xeb1}, {0xeb4, 0xeb9}, {0xebb, 0xebc},
714     {0xec8, 0xecd}, {0xf18, 0xf19}, {0xf35, 0xf35}, {0xf37, 0xf37},
715     {0xf39, 0xf39}, {0xf71, 0xf7e}, {0xf80, 0xf84}, {0xf86, 0xf87},
716     {0xf90, 0xf97}, {0xf99, 0xfbc}, {0xfc6, 0xfc6}, {0x102d, 0x1030},
717     {0x1032, 0x1032}, {0x1036, 0x1037}, {0x1039, 0x1039}, {0x1058, 0x1059},
718     {0x1712, 0x1714}, {0x1732, 0x1734}, {0x1752, 0x1753}, {0x1772, 0x1773},
719     {0x17b7, 0x17bd}, {0x17c6, 0x17c6}, {0x17c9, 0x17d3}, {0x17dd, 0x17dd},
720     {0x180b, 0x180d}, {0x18a9, 0x18a9}, {0x1920, 0x1922}, {0x1927, 0x1928},
721     {0x1932, 0x1932}, {0x1939, 0x193b}, {0x20d0, 0x20dc}, {0x20e1, 0x20e1},
722     {0x20e5, 0x20ea}, {0x302a, 0x302f}, {0x3099, 0x309a}, {0xfb1e, 0xfb1e},
723     {0xfe00, 0xfe0f}, {0xfe20, 0xfe23} };
724 static const xmlChLRange xmlMnL[] = {{0x1d167, 0x1d169}, {0x1d17b, 0x1d182},
725     {0x1d185, 0x1d18b}, {0x1d1aa, 0x1d1ad}, {0xe0100, 0xe01ef} };
726 static xmlChRangeGroup xmlMnG = {108,5,xmlMnS,xmlMnL};
727 
728 static const xmlChSRange xmlNS[] = {{0x30, 0x39}, {0xb2, 0xb3},
729     {0xb9, 0xb9}, {0xbc, 0xbe}, {0x660, 0x669}, {0x6f0, 0x6f9},
730     {0x966, 0x96f}, {0x9e6, 0x9ef}, {0x9f4, 0x9f9}, {0xa66, 0xa6f},
731     {0xae6, 0xaef}, {0xb66, 0xb6f}, {0xbe7, 0xbf2}, {0xc66, 0xc6f},
732     {0xce6, 0xcef}, {0xd66, 0xd6f}, {0xe50, 0xe59}, {0xed0, 0xed9},
733     {0xf20, 0xf33}, {0x1040, 0x1049}, {0x1369, 0x137c}, {0x16ee, 0x16f0},
734     {0x17e0, 0x17e9}, {0x17f0, 0x17f9}, {0x1810, 0x1819}, {0x1946, 0x194f},
735     {0x2070, 0x2070}, {0x2074, 0x2079}, {0x2080, 0x2089}, {0x2153, 0x2183},
736     {0x2460, 0x249b}, {0x24ea, 0x24ff}, {0x2776, 0x2793}, {0x3007, 0x3007},
737     {0x3021, 0x3029}, {0x3038, 0x303a}, {0x3192, 0x3195}, {0x3220, 0x3229},
738     {0x3251, 0x325f}, {0x3280, 0x3289}, {0x32b1, 0x32bf}, {0xff10, 0xff19} };
739 static const xmlChLRange xmlNL[] = {{0x10107, 0x10133}, {0x10320, 0x10323},
740     {0x1034a, 0x1034a}, {0x104a0, 0x104a9}, {0x1d7ce, 0x1d7ff} };
741 static xmlChRangeGroup xmlNG = {42,5,xmlNS,xmlNL};
742 
743 static const xmlChSRange xmlNdS[] = {{0x30, 0x39}, {0x660, 0x669},
744     {0x6f0, 0x6f9}, {0x966, 0x96f}, {0x9e6, 0x9ef}, {0xa66, 0xa6f},
745     {0xae6, 0xaef}, {0xb66, 0xb6f}, {0xbe7, 0xbef}, {0xc66, 0xc6f},
746     {0xce6, 0xcef}, {0xd66, 0xd6f}, {0xe50, 0xe59}, {0xed0, 0xed9},
747     {0xf20, 0xf29}, {0x1040, 0x1049}, {0x1369, 0x1371}, {0x17e0, 0x17e9},
748     {0x1810, 0x1819}, {0x1946, 0x194f}, {0xff10, 0xff19} };
749 static const xmlChLRange xmlNdL[] = {{0x104a0, 0x104a9}, {0x1d7ce, 0x1d7ff} };
750 static xmlChRangeGroup xmlNdG = {21,2,xmlNdS,xmlNdL};
751 
752 static const xmlChSRange xmlNoS[] = {{0xb2, 0xb3}, {0xb9, 0xb9},
753     {0xbc, 0xbe}, {0x9f4, 0x9f9}, {0xbf0, 0xbf2}, {0xf2a, 0xf33},
754     {0x1372, 0x137c}, {0x17f0, 0x17f9}, {0x2070, 0x2070}, {0x2074, 0x2079},
755     {0x2080, 0x2089}, {0x2153, 0x215f}, {0x2460, 0x249b}, {0x24ea, 0x24ff},
756     {0x2776, 0x2793}, {0x3192, 0x3195}, {0x3220, 0x3229}, {0x3251, 0x325f},
757     {0x3280, 0x3289}, {0x32b1, 0x32bf} };
758 static const xmlChLRange xmlNoL[] = {{0x10107, 0x10133}, {0x10320, 0x10323} };
759 static xmlChRangeGroup xmlNoG = {20,2,xmlNoS,xmlNoL};
760 
761 static const xmlChSRange xmlPS[] = {{0x21, 0x23}, {0x25, 0x2a},
762     {0x2c, 0x2f}, {0x3a, 0x3b}, {0x3f, 0x40}, {0x5b, 0x5d}, {0x5f, 0x5f},
763     {0x7b, 0x7b}, {0x7d, 0x7d}, {0xa1, 0xa1}, {0xab, 0xab}, {0xb7, 0xb7},
764     {0xbb, 0xbb}, {0xbf, 0xbf}, {0x37e, 0x37e}, {0x387, 0x387},
765     {0x55a, 0x55f}, {0x589, 0x58a}, {0x5be, 0x5be}, {0x5c0, 0x5c0},
766     {0x5c3, 0x5c3}, {0x5f3, 0x5f4}, {0x60c, 0x60d}, {0x61b, 0x61b},
767     {0x61f, 0x61f}, {0x66a, 0x66d}, {0x6d4, 0x6d4}, {0x700, 0x70d},
768     {0x964, 0x965}, {0x970, 0x970}, {0xdf4, 0xdf4}, {0xe4f, 0xe4f},
769     {0xe5a, 0xe5b}, {0xf04, 0xf12}, {0xf3a, 0xf3d}, {0xf85, 0xf85},
770     {0x104a, 0x104f}, {0x10fb, 0x10fb}, {0x1361, 0x1368}, {0x166d, 0x166e},
771     {0x169b, 0x169c}, {0x16eb, 0x16ed}, {0x1735, 0x1736}, {0x17d4, 0x17d6},
772     {0x17d8, 0x17da}, {0x1800, 0x180a}, {0x1944, 0x1945}, {0x2010, 0x2027},
773     {0x2030, 0x2043}, {0x2045, 0x2051}, {0x2053, 0x2054}, {0x2057, 0x2057},
774     {0x207d, 0x207e}, {0x208d, 0x208e}, {0x2329, 0x232a}, {0x23b4, 0x23b6},
775     {0x2768, 0x2775}, {0x27e6, 0x27eb}, {0x2983, 0x2998}, {0x29d8, 0x29db},
776     {0x29fc, 0x29fd}, {0x3001, 0x3003}, {0x3008, 0x3011}, {0x3014, 0x301f},
777     {0x3030, 0x3030}, {0x303d, 0x303d}, {0x30a0, 0x30a0}, {0x30fb, 0x30fb},
778     {0xfd3e, 0xfd3f}, {0xfe30, 0xfe52}, {0xfe54, 0xfe61}, {0xfe63, 0xfe63},
779     {0xfe68, 0xfe68}, {0xfe6a, 0xfe6b}, {0xff01, 0xff03}, {0xff05, 0xff0a},
780     {0xff0c, 0xff0f}, {0xff1a, 0xff1b}, {0xff1f, 0xff20}, {0xff3b, 0xff3d},
781     {0xff3f, 0xff3f}, {0xff5b, 0xff5b}, {0xff5d, 0xff5d}, {0xff5f, 0xff65} };
782 static const xmlChLRange xmlPL[] = {{0x10100, 0x10101}, {0x1039f, 0x1039f} };
783 static xmlChRangeGroup xmlPG = {84,2,xmlPS,xmlPL};
784 
785 static const xmlChSRange xmlPdS[] = {{0x2d, 0x2d}, {0x58a, 0x58a},
786     {0x1806, 0x1806}, {0x2010, 0x2015}, {0x301c, 0x301c}, {0x3030, 0x3030},
787     {0x30a0, 0x30a0}, {0xfe31, 0xfe32}, {0xfe58, 0xfe58}, {0xfe63, 0xfe63},
788     {0xff0d, 0xff0d} };
789 static xmlChRangeGroup xmlPdG = {11,0,xmlPdS,NULL};
790 
791 static const xmlChSRange xmlPeS[] = {{0x29, 0x29}, {0x5d, 0x5d},
792     {0x7d, 0x7d}, {0xf3b, 0xf3b}, {0xf3d, 0xf3d}, {0x169c, 0x169c},
793     {0x2046, 0x2046}, {0x207e, 0x207e}, {0x208e, 0x208e}, {0x232a, 0x232a},
794     {0x23b5, 0x23b5}, {0x2769, 0x2769}, {0x276b, 0x276b}, {0x276d, 0x276d},
795     {0x276f, 0x276f}, {0x2771, 0x2771}, {0x2773, 0x2773}, {0x2775, 0x2775},
796     {0x27e7, 0x27e7}, {0x27e9, 0x27e9}, {0x27eb, 0x27eb}, {0x2984, 0x2984},
797     {0x2986, 0x2986}, {0x2988, 0x2988}, {0x298a, 0x298a}, {0x298c, 0x298c},
798     {0x298e, 0x298e}, {0x2990, 0x2990}, {0x2992, 0x2992}, {0x2994, 0x2994},
799     {0x2996, 0x2996}, {0x2998, 0x2998}, {0x29d9, 0x29d9}, {0x29db, 0x29db},
800     {0x29fd, 0x29fd}, {0x3009, 0x3009}, {0x300b, 0x300b}, {0x300d, 0x300d},
801     {0x300f, 0x300f}, {0x3011, 0x3011}, {0x3015, 0x3015}, {0x3017, 0x3017},
802     {0x3019, 0x3019}, {0x301b, 0x301b}, {0x301e, 0x301f}, {0xfd3f, 0xfd3f},
803     {0xfe36, 0xfe36}, {0xfe38, 0xfe38}, {0xfe3a, 0xfe3a}, {0xfe3c, 0xfe3c},
804     {0xfe3e, 0xfe3e}, {0xfe40, 0xfe40}, {0xfe42, 0xfe42}, {0xfe44, 0xfe44},
805     {0xfe48, 0xfe48}, {0xfe5a, 0xfe5a}, {0xfe5c, 0xfe5c}, {0xfe5e, 0xfe5e},
806     {0xff09, 0xff09}, {0xff3d, 0xff3d}, {0xff5d, 0xff5d}, {0xff60, 0xff60},
807     {0xff63, 0xff63} };
808 static xmlChRangeGroup xmlPeG = {63,0,xmlPeS,NULL};
809 
810 static const xmlChSRange xmlPoS[] = {{0x21, 0x23}, {0x25, 0x27},
811     {0x2a, 0x2a}, {0x2c, 0x2c}, {0x2e, 0x2f}, {0x3a, 0x3b}, {0x3f, 0x40},
812     {0x5c, 0x5c}, {0xa1, 0xa1}, {0xb7, 0xb7}, {0xbf, 0xbf}, {0x37e, 0x37e},
813     {0x387, 0x387}, {0x55a, 0x55f}, {0x589, 0x589}, {0x5be, 0x5be},
814     {0x5c0, 0x5c0}, {0x5c3, 0x5c3}, {0x5f3, 0x5f4}, {0x60c, 0x60d},
815     {0x61b, 0x61b}, {0x61f, 0x61f}, {0x66a, 0x66d}, {0x6d4, 0x6d4},
816     {0x700, 0x70d}, {0x964, 0x965}, {0x970, 0x970}, {0xdf4, 0xdf4},
817     {0xe4f, 0xe4f}, {0xe5a, 0xe5b}, {0xf04, 0xf12}, {0xf85, 0xf85},
818     {0x104a, 0x104f}, {0x10fb, 0x10fb}, {0x1361, 0x1368}, {0x166d, 0x166e},
819     {0x16eb, 0x16ed}, {0x1735, 0x1736}, {0x17d4, 0x17d6}, {0x17d8, 0x17da},
820     {0x1800, 0x1805}, {0x1807, 0x180a}, {0x1944, 0x1945}, {0x2016, 0x2017},
821     {0x2020, 0x2027}, {0x2030, 0x2038}, {0x203b, 0x203e}, {0x2041, 0x2043},
822     {0x2047, 0x2051}, {0x2053, 0x2053}, {0x2057, 0x2057}, {0x23b6, 0x23b6},
823     {0x3001, 0x3003}, {0x303d, 0x303d}, {0xfe30, 0xfe30}, {0xfe45, 0xfe46},
824     {0xfe49, 0xfe4c}, {0xfe50, 0xfe52}, {0xfe54, 0xfe57}, {0xfe5f, 0xfe61},
825     {0xfe68, 0xfe68}, {0xfe6a, 0xfe6b}, {0xff01, 0xff03}, {0xff05, 0xff07},
826     {0xff0a, 0xff0a}, {0xff0c, 0xff0c}, {0xff0e, 0xff0f}, {0xff1a, 0xff1b},
827     {0xff1f, 0xff20}, {0xff3c, 0xff3c}, {0xff61, 0xff61}, {0xff64, 0xff64} };
828 static const xmlChLRange xmlPoL[] = {{0x10100, 0x10101}, {0x1039f, 0x1039f} };
829 static xmlChRangeGroup xmlPoG = {72,2,xmlPoS,xmlPoL};
830 
831 static const xmlChSRange xmlPsS[] = {{0x28, 0x28}, {0x5b, 0x5b},
832     {0x7b, 0x7b}, {0xf3a, 0xf3a}, {0xf3c, 0xf3c}, {0x169b, 0x169b},
833     {0x201a, 0x201a}, {0x201e, 0x201e}, {0x2045, 0x2045}, {0x207d, 0x207d},
834     {0x208d, 0x208d}, {0x2329, 0x2329}, {0x23b4, 0x23b4}, {0x2768, 0x2768},
835     {0x276a, 0x276a}, {0x276c, 0x276c}, {0x276e, 0x276e}, {0x2770, 0x2770},
836     {0x2772, 0x2772}, {0x2774, 0x2774}, {0x27e6, 0x27e6}, {0x27e8, 0x27e8},
837     {0x27ea, 0x27ea}, {0x2983, 0x2983}, {0x2985, 0x2985}, {0x2987, 0x2987},
838     {0x2989, 0x2989}, {0x298b, 0x298b}, {0x298d, 0x298d}, {0x298f, 0x298f},
839     {0x2991, 0x2991}, {0x2993, 0x2993}, {0x2995, 0x2995}, {0x2997, 0x2997},
840     {0x29d8, 0x29d8}, {0x29da, 0x29da}, {0x29fc, 0x29fc}, {0x3008, 0x3008},
841     {0x300a, 0x300a}, {0x300c, 0x300c}, {0x300e, 0x300e}, {0x3010, 0x3010},
842     {0x3014, 0x3014}, {0x3016, 0x3016}, {0x3018, 0x3018}, {0x301a, 0x301a},
843     {0x301d, 0x301d}, {0xfd3e, 0xfd3e}, {0xfe35, 0xfe35}, {0xfe37, 0xfe37},
844     {0xfe39, 0xfe39}, {0xfe3b, 0xfe3b}, {0xfe3d, 0xfe3d}, {0xfe3f, 0xfe3f},
845     {0xfe41, 0xfe41}, {0xfe43, 0xfe43}, {0xfe47, 0xfe47}, {0xfe59, 0xfe59},
846     {0xfe5b, 0xfe5b}, {0xfe5d, 0xfe5d}, {0xff08, 0xff08}, {0xff3b, 0xff3b},
847     {0xff5b, 0xff5b}, {0xff5f, 0xff5f}, {0xff62, 0xff62} };
848 static xmlChRangeGroup xmlPsG = {65,0,xmlPsS,NULL};
849 
850 static const xmlChSRange xmlSS[] = {{0x24, 0x24}, {0x2b, 0x2b},
851     {0x3c, 0x3e}, {0x5e, 0x5e}, {0x60, 0x60}, {0x7c, 0x7c}, {0x7e, 0x7e},
852     {0xa2, 0xa9}, {0xac, 0xac}, {0xae, 0xb1}, {0xb4, 0xb4}, {0xb6, 0xb6},
853     {0xb8, 0xb8}, {0xd7, 0xd7}, {0xf7, 0xf7}, {0x2c2, 0x2c5},
854     {0x2d2, 0x2df}, {0x2e5, 0x2ed}, {0x2ef, 0x2ff}, {0x374, 0x375},
855     {0x384, 0x385}, {0x3f6, 0x3f6}, {0x482, 0x482}, {0x60e, 0x60f},
856     {0x6e9, 0x6e9}, {0x6fd, 0x6fe}, {0x9f2, 0x9f3}, {0x9fa, 0x9fa},
857     {0xaf1, 0xaf1}, {0xb70, 0xb70}, {0xbf3, 0xbfa}, {0xe3f, 0xe3f},
858     {0xf01, 0xf03}, {0xf13, 0xf17}, {0xf1a, 0xf1f}, {0xf34, 0xf34},
859     {0xf36, 0xf36}, {0xf38, 0xf38}, {0xfbe, 0xfc5}, {0xfc7, 0xfcc},
860     {0xfcf, 0xfcf}, {0x17db, 0x17db}, {0x1940, 0x1940}, {0x19e0, 0x19ff},
861     {0x1fbd, 0x1fbd}, {0x1fbf, 0x1fc1}, {0x1fcd, 0x1fcf}, {0x1fdd, 0x1fdf},
862     {0x1fed, 0x1fef}, {0x1ffd, 0x1ffe}, {0x2044, 0x2044}, {0x2052, 0x2052},
863     {0x207a, 0x207c}, {0x208a, 0x208c}, {0x20a0, 0x20b1}, {0x2100, 0x2101},
864     {0x2103, 0x2106}, {0x2108, 0x2109}, {0x2114, 0x2114}, {0x2116, 0x2118},
865     {0x211e, 0x2123}, {0x2125, 0x2125}, {0x2127, 0x2127}, {0x2129, 0x2129},
866     {0x212e, 0x212e}, {0x2132, 0x2132}, {0x213a, 0x213b}, {0x2140, 0x2144},
867     {0x214a, 0x214b}, {0x2190, 0x2328}, {0x232b, 0x23b3}, {0x23b7, 0x23d0},
868     {0x2400, 0x2426}, {0x2440, 0x244a}, {0x249c, 0x24e9}, {0x2500, 0x2617},
869     {0x2619, 0x267d}, {0x2680, 0x2691}, {0x26a0, 0x26a1}, {0x2701, 0x2704},
870     {0x2706, 0x2709}, {0x270c, 0x2727}, {0x2729, 0x274b}, {0x274d, 0x274d},
871     {0x274f, 0x2752}, {0x2756, 0x2756}, {0x2758, 0x275e}, {0x2761, 0x2767},
872     {0x2794, 0x2794}, {0x2798, 0x27af}, {0x27b1, 0x27be}, {0x27d0, 0x27e5},
873     {0x27f0, 0x2982}, {0x2999, 0x29d7}, {0x29dc, 0x29fb}, {0x29fe, 0x2b0d},
874     {0x2e80, 0x2e99}, {0x2e9b, 0x2ef3}, {0x2f00, 0x2fd5}, {0x2ff0, 0x2ffb},
875     {0x3004, 0x3004}, {0x3012, 0x3013}, {0x3020, 0x3020}, {0x3036, 0x3037},
876     {0x303e, 0x303f}, {0x309b, 0x309c}, {0x3190, 0x3191}, {0x3196, 0x319f},
877     {0x3200, 0x321e}, {0x322a, 0x3243}, {0x3250, 0x3250}, {0x3260, 0x327d},
878     {0x327f, 0x327f}, {0x328a, 0x32b0}, {0x32c0, 0x32fe}, {0x3300, 0x33ff},
879     {0x4dc0, 0x4dff}, {0xa490, 0xa4c6}, {0xfb29, 0xfb29}, {0xfdfc, 0xfdfd},
880     {0xfe62, 0xfe62}, {0xfe64, 0xfe66}, {0xfe69, 0xfe69}, {0xff04, 0xff04},
881     {0xff0b, 0xff0b}, {0xff1c, 0xff1e}, {0xff3e, 0xff3e}, {0xff40, 0xff40},
882     {0xff5c, 0xff5c}, {0xff5e, 0xff5e}, {0xffe0, 0xffe6}, {0xffe8, 0xffee},
883     {0xfffc, 0xfffd} };
884 static const xmlChLRange xmlSL[] = {{0x10102, 0x10102}, {0x10137, 0x1013f},
885     {0x1d000, 0x1d0f5}, {0x1d100, 0x1d126}, {0x1d12a, 0x1d164},
886     {0x1d16a, 0x1d16c}, {0x1d183, 0x1d184}, {0x1d18c, 0x1d1a9},
887     {0x1d1ae, 0x1d1dd}, {0x1d300, 0x1d356}, {0x1d6c1, 0x1d6c1},
888     {0x1d6db, 0x1d6db}, {0x1d6fb, 0x1d6fb}, {0x1d715, 0x1d715},
889     {0x1d735, 0x1d735}, {0x1d74f, 0x1d74f}, {0x1d76f, 0x1d76f},
890     {0x1d789, 0x1d789}, {0x1d7a9, 0x1d7a9}, {0x1d7c3, 0x1d7c3} };
891 static xmlChRangeGroup xmlSG = {133,20,xmlSS,xmlSL};
892 
893 static const xmlChSRange xmlScS[] = {{0x24, 0x24}, {0xa2, 0xa5},
894     {0x9f2, 0x9f3}, {0xaf1, 0xaf1}, {0xbf9, 0xbf9}, {0xe3f, 0xe3f},
895     {0x17db, 0x17db}, {0x20a0, 0x20b1}, {0xfdfc, 0xfdfc}, {0xfe69, 0xfe69},
896     {0xff04, 0xff04}, {0xffe0, 0xffe1}, {0xffe5, 0xffe6} };
897 static xmlChRangeGroup xmlScG = {13,0,xmlScS,NULL};
898 
899 static const xmlChSRange xmlSkS[] = {{0x5e, 0x5e}, {0x60, 0x60},
900     {0xa8, 0xa8}, {0xaf, 0xaf}, {0xb4, 0xb4}, {0xb8, 0xb8}, {0x2c2, 0x2c5},
901     {0x2d2, 0x2df}, {0x2e5, 0x2ed}, {0x2ef, 0x2ff}, {0x374, 0x375},
902     {0x384, 0x385}, {0x1fbd, 0x1fbd}, {0x1fbf, 0x1fc1}, {0x1fcd, 0x1fcf},
903     {0x1fdd, 0x1fdf}, {0x1fed, 0x1fef}, {0x1ffd, 0x1ffe}, {0x309b, 0x309c},
904     {0xff3e, 0xff3e}, {0xff40, 0xff40}, {0xffe3, 0xffe3} };
905 static xmlChRangeGroup xmlSkG = {22,0,xmlSkS,NULL};
906 
907 static const xmlChSRange xmlSmS[] = {{0x2b, 0x2b}, {0x3c, 0x3e},
908     {0x7c, 0x7c}, {0x7e, 0x7e}, {0xac, 0xac}, {0xb1, 0xb1}, {0xd7, 0xd7},
909     {0xf7, 0xf7}, {0x3f6, 0x3f6}, {0x2044, 0x2044}, {0x2052, 0x2052},
910     {0x207a, 0x207c}, {0x208a, 0x208c}, {0x2140, 0x2144}, {0x214b, 0x214b},
911     {0x2190, 0x2194}, {0x219a, 0x219b}, {0x21a0, 0x21a0}, {0x21a3, 0x21a3},
912     {0x21a6, 0x21a6}, {0x21ae, 0x21ae}, {0x21ce, 0x21cf}, {0x21d2, 0x21d2},
913     {0x21d4, 0x21d4}, {0x21f4, 0x22ff}, {0x2308, 0x230b}, {0x2320, 0x2321},
914     {0x237c, 0x237c}, {0x239b, 0x23b3}, {0x25b7, 0x25b7}, {0x25c1, 0x25c1},
915     {0x25f8, 0x25ff}, {0x266f, 0x266f}, {0x27d0, 0x27e5}, {0x27f0, 0x27ff},
916     {0x2900, 0x2982}, {0x2999, 0x29d7}, {0x29dc, 0x29fb}, {0x29fe, 0x2aff},
917     {0xfb29, 0xfb29}, {0xfe62, 0xfe62}, {0xfe64, 0xfe66}, {0xff0b, 0xff0b},
918     {0xff1c, 0xff1e}, {0xff5c, 0xff5c}, {0xff5e, 0xff5e}, {0xffe2, 0xffe2},
919     {0xffe9, 0xffec} };
920 static const xmlChLRange xmlSmL[] = {{0x1d6c1, 0x1d6c1}, {0x1d6db, 0x1d6db},
921     {0x1d6fb, 0x1d6fb}, {0x1d715, 0x1d715}, {0x1d735, 0x1d735},
922     {0x1d74f, 0x1d74f}, {0x1d76f, 0x1d76f}, {0x1d789, 0x1d789},
923     {0x1d7a9, 0x1d7a9}, {0x1d7c3, 0x1d7c3} };
924 static xmlChRangeGroup xmlSmG = {48,10,xmlSmS,xmlSmL};
925 
926 static const xmlChSRange xmlSoS[] = {{0xa6, 0xa7}, {0xa9, 0xa9},
927     {0xae, 0xae}, {0xb0, 0xb0}, {0xb6, 0xb6}, {0x482, 0x482},
928     {0x60e, 0x60f}, {0x6e9, 0x6e9}, {0x6fd, 0x6fe}, {0x9fa, 0x9fa},
929     {0xb70, 0xb70}, {0xbf3, 0xbf8}, {0xbfa, 0xbfa}, {0xf01, 0xf03},
930     {0xf13, 0xf17}, {0xf1a, 0xf1f}, {0xf34, 0xf34}, {0xf36, 0xf36},
931     {0xf38, 0xf38}, {0xfbe, 0xfc5}, {0xfc7, 0xfcc}, {0xfcf, 0xfcf},
932     {0x1940, 0x1940}, {0x19e0, 0x19ff}, {0x2100, 0x2101}, {0x2103, 0x2106},
933     {0x2108, 0x2109}, {0x2114, 0x2114}, {0x2116, 0x2118}, {0x211e, 0x2123},
934     {0x2125, 0x2125}, {0x2127, 0x2127}, {0x2129, 0x2129}, {0x212e, 0x212e},
935     {0x2132, 0x2132}, {0x213a, 0x213b}, {0x214a, 0x214a}, {0x2195, 0x2199},
936     {0x219c, 0x219f}, {0x21a1, 0x21a2}, {0x21a4, 0x21a5}, {0x21a7, 0x21ad},
937     {0x21af, 0x21cd}, {0x21d0, 0x21d1}, {0x21d3, 0x21d3}, {0x21d5, 0x21f3},
938     {0x2300, 0x2307}, {0x230c, 0x231f}, {0x2322, 0x2328}, {0x232b, 0x237b},
939     {0x237d, 0x239a}, {0x23b7, 0x23d0}, {0x2400, 0x2426}, {0x2440, 0x244a},
940     {0x249c, 0x24e9}, {0x2500, 0x25b6}, {0x25b8, 0x25c0}, {0x25c2, 0x25f7},
941     {0x2600, 0x2617}, {0x2619, 0x266e}, {0x2670, 0x267d}, {0x2680, 0x2691},
942     {0x26a0, 0x26a1}, {0x2701, 0x2704}, {0x2706, 0x2709}, {0x270c, 0x2727},
943     {0x2729, 0x274b}, {0x274d, 0x274d}, {0x274f, 0x2752}, {0x2756, 0x2756},
944     {0x2758, 0x275e}, {0x2761, 0x2767}, {0x2794, 0x2794}, {0x2798, 0x27af},
945     {0x27b1, 0x27be}, {0x2800, 0x28ff}, {0x2b00, 0x2b0d}, {0x2e80, 0x2e99},
946     {0x2e9b, 0x2ef3}, {0x2f00, 0x2fd5}, {0x2ff0, 0x2ffb}, {0x3004, 0x3004},
947     {0x3012, 0x3013}, {0x3020, 0x3020}, {0x3036, 0x3037}, {0x303e, 0x303f},
948     {0x3190, 0x3191}, {0x3196, 0x319f}, {0x3200, 0x321e}, {0x322a, 0x3243},
949     {0x3250, 0x3250}, {0x3260, 0x327d}, {0x327f, 0x327f}, {0x328a, 0x32b0},
950     {0x32c0, 0x32fe}, {0x3300, 0x33ff}, {0x4dc0, 0x4dff}, {0xa490, 0xa4c6},
951     {0xfdfd, 0xfdfd}, {0xffe4, 0xffe4}, {0xffe8, 0xffe8}, {0xffed, 0xffee},
952     {0xfffc, 0xfffd} };
953 static const xmlChLRange xmlSoL[] = {{0x10102, 0x10102}, {0x10137, 0x1013f},
954     {0x1d000, 0x1d0f5}, {0x1d100, 0x1d126}, {0x1d12a, 0x1d164},
955     {0x1d16a, 0x1d16c}, {0x1d183, 0x1d184}, {0x1d18c, 0x1d1a9},
956     {0x1d1ae, 0x1d1dd}, {0x1d300, 0x1d356} };
957 static xmlChRangeGroup xmlSoG = {103,10,xmlSoS,xmlSoL};
958 
959 static const xmlChSRange xmlZS[] = {{0x20, 0x20}, {0xa0, 0xa0},
960     {0x1680, 0x1680}, {0x180e, 0x180e}, {0x2000, 0x200a}, {0x2028, 0x2029},
961     {0x202f, 0x202f}, {0x205f, 0x205f}, {0x3000, 0x3000} };
962 static xmlChRangeGroup xmlZG = {9,0,xmlZS,NULL};
963 
964 static xmlUnicodeNameTable xmlUnicodeBlockTbl = {xmlUnicodeBlocks, 128};
965 static xmlUnicodeNameTable xmlUnicodeCatTbl = {xmlUnicodeCats, 36};
966 
967 /**
968  * xmlUnicodeLookup:
969  * @tptr: pointer to the name table
970  * @name: name to be found
971  *
972  * binary table lookup for user-supplied name
973  *
974  * Returns pointer to range function if found, otherwise NULL
975  */
976 static xmlIntFunc
xmlUnicodeLookup(xmlUnicodeNameTable * tptr,const char * tname)977 *xmlUnicodeLookup(xmlUnicodeNameTable *tptr, const char *tname) {
978     int low, high, mid, cmp;
979     const xmlUnicodeRange *sptr;
980 
981     if ((tptr == NULL) || (tname == NULL)) return(NULL);
982 
983     low = 0;
984     high = tptr->numentries - 1;
985     sptr = tptr->table;
986     while (low <= high) {
987 	mid = (low + high) / 2;
988 	if ((cmp=strcmp(tname, sptr[mid].rangename)) == 0)
989 	    return (sptr[mid].func);
990 	if (cmp < 0)
991 	    high = mid - 1;
992 	else
993 	    low = mid + 1;
994     }
995     return (NULL);
996 }
997 
998 /**
999  * xmlUCSIsAegeanNumbers:
1000  * @code: UCS code point
1001  *
1002  * Check whether the character is part of AegeanNumbers UCS Block
1003  *
1004  * Returns 1 if true 0 otherwise
1005  */
1006 int
xmlUCSIsAegeanNumbers(int code)1007 xmlUCSIsAegeanNumbers(int code) {
1008     return(((code >= 0x10100) && (code <= 0x1013F)));
1009 }
1010 
1011 /**
1012  * xmlUCSIsAlphabeticPresentationForms:
1013  * @code: UCS code point
1014  *
1015  * Check whether the character is part of AlphabeticPresentationForms UCS Block
1016  *
1017  * Returns 1 if true 0 otherwise
1018  */
1019 int
xmlUCSIsAlphabeticPresentationForms(int code)1020 xmlUCSIsAlphabeticPresentationForms(int code) {
1021     return(((code >= 0xFB00) && (code <= 0xFB4F)));
1022 }
1023 
1024 /**
1025  * xmlUCSIsArabic:
1026  * @code: UCS code point
1027  *
1028  * Check whether the character is part of Arabic UCS Block
1029  *
1030  * Returns 1 if true 0 otherwise
1031  */
1032 int
xmlUCSIsArabic(int code)1033 xmlUCSIsArabic(int code) {
1034     return(((code >= 0x0600) && (code <= 0x06FF)));
1035 }
1036 
1037 /**
1038  * xmlUCSIsArabicPresentationFormsA:
1039  * @code: UCS code point
1040  *
1041  * Check whether the character is part of ArabicPresentationForms-A UCS Block
1042  *
1043  * Returns 1 if true 0 otherwise
1044  */
1045 int
xmlUCSIsArabicPresentationFormsA(int code)1046 xmlUCSIsArabicPresentationFormsA(int code) {
1047     return(((code >= 0xFB50) && (code <= 0xFDFF)));
1048 }
1049 
1050 /**
1051  * xmlUCSIsArabicPresentationFormsB:
1052  * @code: UCS code point
1053  *
1054  * Check whether the character is part of ArabicPresentationForms-B UCS Block
1055  *
1056  * Returns 1 if true 0 otherwise
1057  */
1058 int
xmlUCSIsArabicPresentationFormsB(int code)1059 xmlUCSIsArabicPresentationFormsB(int code) {
1060     return(((code >= 0xFE70) && (code <= 0xFEFF)));
1061 }
1062 
1063 /**
1064  * xmlUCSIsArmenian:
1065  * @code: UCS code point
1066  *
1067  * Check whether the character is part of Armenian UCS Block
1068  *
1069  * Returns 1 if true 0 otherwise
1070  */
1071 int
xmlUCSIsArmenian(int code)1072 xmlUCSIsArmenian(int code) {
1073     return(((code >= 0x0530) && (code <= 0x058F)));
1074 }
1075 
1076 /**
1077  * xmlUCSIsArrows:
1078  * @code: UCS code point
1079  *
1080  * Check whether the character is part of Arrows UCS Block
1081  *
1082  * Returns 1 if true 0 otherwise
1083  */
1084 int
xmlUCSIsArrows(int code)1085 xmlUCSIsArrows(int code) {
1086     return(((code >= 0x2190) && (code <= 0x21FF)));
1087 }
1088 
1089 /**
1090  * xmlUCSIsBasicLatin:
1091  * @code: UCS code point
1092  *
1093  * Check whether the character is part of BasicLatin UCS Block
1094  *
1095  * Returns 1 if true 0 otherwise
1096  */
1097 int
xmlUCSIsBasicLatin(int code)1098 xmlUCSIsBasicLatin(int code) {
1099     return(((code >= 0x0000) && (code <= 0x007F)));
1100 }
1101 
1102 /**
1103  * xmlUCSIsBengali:
1104  * @code: UCS code point
1105  *
1106  * Check whether the character is part of Bengali UCS Block
1107  *
1108  * Returns 1 if true 0 otherwise
1109  */
1110 int
xmlUCSIsBengali(int code)1111 xmlUCSIsBengali(int code) {
1112     return(((code >= 0x0980) && (code <= 0x09FF)));
1113 }
1114 
1115 /**
1116  * xmlUCSIsBlockElements:
1117  * @code: UCS code point
1118  *
1119  * Check whether the character is part of BlockElements UCS Block
1120  *
1121  * Returns 1 if true 0 otherwise
1122  */
1123 int
xmlUCSIsBlockElements(int code)1124 xmlUCSIsBlockElements(int code) {
1125     return(((code >= 0x2580) && (code <= 0x259F)));
1126 }
1127 
1128 /**
1129  * xmlUCSIsBopomofo:
1130  * @code: UCS code point
1131  *
1132  * Check whether the character is part of Bopomofo UCS Block
1133  *
1134  * Returns 1 if true 0 otherwise
1135  */
1136 int
xmlUCSIsBopomofo(int code)1137 xmlUCSIsBopomofo(int code) {
1138     return(((code >= 0x3100) && (code <= 0x312F)));
1139 }
1140 
1141 /**
1142  * xmlUCSIsBopomofoExtended:
1143  * @code: UCS code point
1144  *
1145  * Check whether the character is part of BopomofoExtended UCS Block
1146  *
1147  * Returns 1 if true 0 otherwise
1148  */
1149 int
xmlUCSIsBopomofoExtended(int code)1150 xmlUCSIsBopomofoExtended(int code) {
1151     return(((code >= 0x31A0) && (code <= 0x31BF)));
1152 }
1153 
1154 /**
1155  * xmlUCSIsBoxDrawing:
1156  * @code: UCS code point
1157  *
1158  * Check whether the character is part of BoxDrawing UCS Block
1159  *
1160  * Returns 1 if true 0 otherwise
1161  */
1162 int
xmlUCSIsBoxDrawing(int code)1163 xmlUCSIsBoxDrawing(int code) {
1164     return(((code >= 0x2500) && (code <= 0x257F)));
1165 }
1166 
1167 /**
1168  * xmlUCSIsBraillePatterns:
1169  * @code: UCS code point
1170  *
1171  * Check whether the character is part of BraillePatterns UCS Block
1172  *
1173  * Returns 1 if true 0 otherwise
1174  */
1175 int
xmlUCSIsBraillePatterns(int code)1176 xmlUCSIsBraillePatterns(int code) {
1177     return(((code >= 0x2800) && (code <= 0x28FF)));
1178 }
1179 
1180 /**
1181  * xmlUCSIsBuhid:
1182  * @code: UCS code point
1183  *
1184  * Check whether the character is part of Buhid UCS Block
1185  *
1186  * Returns 1 if true 0 otherwise
1187  */
1188 int
xmlUCSIsBuhid(int code)1189 xmlUCSIsBuhid(int code) {
1190     return(((code >= 0x1740) && (code <= 0x175F)));
1191 }
1192 
1193 /**
1194  * xmlUCSIsByzantineMusicalSymbols:
1195  * @code: UCS code point
1196  *
1197  * Check whether the character is part of ByzantineMusicalSymbols UCS Block
1198  *
1199  * Returns 1 if true 0 otherwise
1200  */
1201 int
xmlUCSIsByzantineMusicalSymbols(int code)1202 xmlUCSIsByzantineMusicalSymbols(int code) {
1203     return(((code >= 0x1D000) && (code <= 0x1D0FF)));
1204 }
1205 
1206 /**
1207  * xmlUCSIsCJKCompatibility:
1208  * @code: UCS code point
1209  *
1210  * Check whether the character is part of CJKCompatibility UCS Block
1211  *
1212  * Returns 1 if true 0 otherwise
1213  */
1214 int
xmlUCSIsCJKCompatibility(int code)1215 xmlUCSIsCJKCompatibility(int code) {
1216     return(((code >= 0x3300) && (code <= 0x33FF)));
1217 }
1218 
1219 /**
1220  * xmlUCSIsCJKCompatibilityForms:
1221  * @code: UCS code point
1222  *
1223  * Check whether the character is part of CJKCompatibilityForms UCS Block
1224  *
1225  * Returns 1 if true 0 otherwise
1226  */
1227 int
xmlUCSIsCJKCompatibilityForms(int code)1228 xmlUCSIsCJKCompatibilityForms(int code) {
1229     return(((code >= 0xFE30) && (code <= 0xFE4F)));
1230 }
1231 
1232 /**
1233  * xmlUCSIsCJKCompatibilityIdeographs:
1234  * @code: UCS code point
1235  *
1236  * Check whether the character is part of CJKCompatibilityIdeographs UCS Block
1237  *
1238  * Returns 1 if true 0 otherwise
1239  */
1240 int
xmlUCSIsCJKCompatibilityIdeographs(int code)1241 xmlUCSIsCJKCompatibilityIdeographs(int code) {
1242     return(((code >= 0xF900) && (code <= 0xFAFF)));
1243 }
1244 
1245 /**
1246  * xmlUCSIsCJKCompatibilityIdeographsSupplement:
1247  * @code: UCS code point
1248  *
1249  * Check whether the character is part of CJKCompatibilityIdeographsSupplement UCS Block
1250  *
1251  * Returns 1 if true 0 otherwise
1252  */
1253 int
xmlUCSIsCJKCompatibilityIdeographsSupplement(int code)1254 xmlUCSIsCJKCompatibilityIdeographsSupplement(int code) {
1255     return(((code >= 0x2F800) && (code <= 0x2FA1F)));
1256 }
1257 
1258 /**
1259  * xmlUCSIsCJKRadicalsSupplement:
1260  * @code: UCS code point
1261  *
1262  * Check whether the character is part of CJKRadicalsSupplement UCS Block
1263  *
1264  * Returns 1 if true 0 otherwise
1265  */
1266 int
xmlUCSIsCJKRadicalsSupplement(int code)1267 xmlUCSIsCJKRadicalsSupplement(int code) {
1268     return(((code >= 0x2E80) && (code <= 0x2EFF)));
1269 }
1270 
1271 /**
1272  * xmlUCSIsCJKSymbolsandPunctuation:
1273  * @code: UCS code point
1274  *
1275  * Check whether the character is part of CJKSymbolsandPunctuation UCS Block
1276  *
1277  * Returns 1 if true 0 otherwise
1278  */
1279 int
xmlUCSIsCJKSymbolsandPunctuation(int code)1280 xmlUCSIsCJKSymbolsandPunctuation(int code) {
1281     return(((code >= 0x3000) && (code <= 0x303F)));
1282 }
1283 
1284 /**
1285  * xmlUCSIsCJKUnifiedIdeographs:
1286  * @code: UCS code point
1287  *
1288  * Check whether the character is part of CJKUnifiedIdeographs UCS Block
1289  *
1290  * Returns 1 if true 0 otherwise
1291  */
1292 int
xmlUCSIsCJKUnifiedIdeographs(int code)1293 xmlUCSIsCJKUnifiedIdeographs(int code) {
1294     return(((code >= 0x4E00) && (code <= 0x9FFF)));
1295 }
1296 
1297 /**
1298  * xmlUCSIsCJKUnifiedIdeographsExtensionA:
1299  * @code: UCS code point
1300  *
1301  * Check whether the character is part of CJKUnifiedIdeographsExtensionA UCS Block
1302  *
1303  * Returns 1 if true 0 otherwise
1304  */
1305 int
xmlUCSIsCJKUnifiedIdeographsExtensionA(int code)1306 xmlUCSIsCJKUnifiedIdeographsExtensionA(int code) {
1307     return(((code >= 0x3400) && (code <= 0x4DBF)));
1308 }
1309 
1310 /**
1311  * xmlUCSIsCJKUnifiedIdeographsExtensionB:
1312  * @code: UCS code point
1313  *
1314  * Check whether the character is part of CJKUnifiedIdeographsExtensionB UCS Block
1315  *
1316  * Returns 1 if true 0 otherwise
1317  */
1318 int
xmlUCSIsCJKUnifiedIdeographsExtensionB(int code)1319 xmlUCSIsCJKUnifiedIdeographsExtensionB(int code) {
1320     return(((code >= 0x20000) && (code <= 0x2A6DF)));
1321 }
1322 
1323 /**
1324  * xmlUCSIsCherokee:
1325  * @code: UCS code point
1326  *
1327  * Check whether the character is part of Cherokee UCS Block
1328  *
1329  * Returns 1 if true 0 otherwise
1330  */
1331 int
xmlUCSIsCherokee(int code)1332 xmlUCSIsCherokee(int code) {
1333     return(((code >= 0x13A0) && (code <= 0x13FF)));
1334 }
1335 
1336 /**
1337  * xmlUCSIsCombiningDiacriticalMarks:
1338  * @code: UCS code point
1339  *
1340  * Check whether the character is part of CombiningDiacriticalMarks UCS Block
1341  *
1342  * Returns 1 if true 0 otherwise
1343  */
1344 int
xmlUCSIsCombiningDiacriticalMarks(int code)1345 xmlUCSIsCombiningDiacriticalMarks(int code) {
1346     return(((code >= 0x0300) && (code <= 0x036F)));
1347 }
1348 
1349 /**
1350  * xmlUCSIsCombiningDiacriticalMarksforSymbols:
1351  * @code: UCS code point
1352  *
1353  * Check whether the character is part of CombiningDiacriticalMarksforSymbols UCS Block
1354  *
1355  * Returns 1 if true 0 otherwise
1356  */
1357 int
xmlUCSIsCombiningDiacriticalMarksforSymbols(int code)1358 xmlUCSIsCombiningDiacriticalMarksforSymbols(int code) {
1359     return(((code >= 0x20D0) && (code <= 0x20FF)));
1360 }
1361 
1362 /**
1363  * xmlUCSIsCombiningHalfMarks:
1364  * @code: UCS code point
1365  *
1366  * Check whether the character is part of CombiningHalfMarks UCS Block
1367  *
1368  * Returns 1 if true 0 otherwise
1369  */
1370 int
xmlUCSIsCombiningHalfMarks(int code)1371 xmlUCSIsCombiningHalfMarks(int code) {
1372     return(((code >= 0xFE20) && (code <= 0xFE2F)));
1373 }
1374 
1375 /**
1376  * xmlUCSIsCombiningMarksforSymbols:
1377  * @code: UCS code point
1378  *
1379  * Check whether the character is part of CombiningMarksforSymbols UCS Block
1380  *
1381  * Returns 1 if true 0 otherwise
1382  */
1383 int
xmlUCSIsCombiningMarksforSymbols(int code)1384 xmlUCSIsCombiningMarksforSymbols(int code) {
1385     return(((code >= 0x20D0) && (code <= 0x20FF)));
1386 }
1387 
1388 /**
1389  * xmlUCSIsControlPictures:
1390  * @code: UCS code point
1391  *
1392  * Check whether the character is part of ControlPictures UCS Block
1393  *
1394  * Returns 1 if true 0 otherwise
1395  */
1396 int
xmlUCSIsControlPictures(int code)1397 xmlUCSIsControlPictures(int code) {
1398     return(((code >= 0x2400) && (code <= 0x243F)));
1399 }
1400 
1401 /**
1402  * xmlUCSIsCurrencySymbols:
1403  * @code: UCS code point
1404  *
1405  * Check whether the character is part of CurrencySymbols UCS Block
1406  *
1407  * Returns 1 if true 0 otherwise
1408  */
1409 int
xmlUCSIsCurrencySymbols(int code)1410 xmlUCSIsCurrencySymbols(int code) {
1411     return(((code >= 0x20A0) && (code <= 0x20CF)));
1412 }
1413 
1414 /**
1415  * xmlUCSIsCypriotSyllabary:
1416  * @code: UCS code point
1417  *
1418  * Check whether the character is part of CypriotSyllabary UCS Block
1419  *
1420  * Returns 1 if true 0 otherwise
1421  */
1422 int
xmlUCSIsCypriotSyllabary(int code)1423 xmlUCSIsCypriotSyllabary(int code) {
1424     return(((code >= 0x10800) && (code <= 0x1083F)));
1425 }
1426 
1427 /**
1428  * xmlUCSIsCyrillic:
1429  * @code: UCS code point
1430  *
1431  * Check whether the character is part of Cyrillic UCS Block
1432  *
1433  * Returns 1 if true 0 otherwise
1434  */
1435 int
xmlUCSIsCyrillic(int code)1436 xmlUCSIsCyrillic(int code) {
1437     return(((code >= 0x0400) && (code <= 0x04FF)));
1438 }
1439 
1440 /**
1441  * xmlUCSIsCyrillicSupplement:
1442  * @code: UCS code point
1443  *
1444  * Check whether the character is part of CyrillicSupplement UCS Block
1445  *
1446  * Returns 1 if true 0 otherwise
1447  */
1448 int
xmlUCSIsCyrillicSupplement(int code)1449 xmlUCSIsCyrillicSupplement(int code) {
1450     return(((code >= 0x0500) && (code <= 0x052F)));
1451 }
1452 
1453 /**
1454  * xmlUCSIsDeseret:
1455  * @code: UCS code point
1456  *
1457  * Check whether the character is part of Deseret UCS Block
1458  *
1459  * Returns 1 if true 0 otherwise
1460  */
1461 int
xmlUCSIsDeseret(int code)1462 xmlUCSIsDeseret(int code) {
1463     return(((code >= 0x10400) && (code <= 0x1044F)));
1464 }
1465 
1466 /**
1467  * xmlUCSIsDevanagari:
1468  * @code: UCS code point
1469  *
1470  * Check whether the character is part of Devanagari UCS Block
1471  *
1472  * Returns 1 if true 0 otherwise
1473  */
1474 int
xmlUCSIsDevanagari(int code)1475 xmlUCSIsDevanagari(int code) {
1476     return(((code >= 0x0900) && (code <= 0x097F)));
1477 }
1478 
1479 /**
1480  * xmlUCSIsDingbats:
1481  * @code: UCS code point
1482  *
1483  * Check whether the character is part of Dingbats UCS Block
1484  *
1485  * Returns 1 if true 0 otherwise
1486  */
1487 int
xmlUCSIsDingbats(int code)1488 xmlUCSIsDingbats(int code) {
1489     return(((code >= 0x2700) && (code <= 0x27BF)));
1490 }
1491 
1492 /**
1493  * xmlUCSIsEnclosedAlphanumerics:
1494  * @code: UCS code point
1495  *
1496  * Check whether the character is part of EnclosedAlphanumerics UCS Block
1497  *
1498  * Returns 1 if true 0 otherwise
1499  */
1500 int
xmlUCSIsEnclosedAlphanumerics(int code)1501 xmlUCSIsEnclosedAlphanumerics(int code) {
1502     return(((code >= 0x2460) && (code <= 0x24FF)));
1503 }
1504 
1505 /**
1506  * xmlUCSIsEnclosedCJKLettersandMonths:
1507  * @code: UCS code point
1508  *
1509  * Check whether the character is part of EnclosedCJKLettersandMonths UCS Block
1510  *
1511  * Returns 1 if true 0 otherwise
1512  */
1513 int
xmlUCSIsEnclosedCJKLettersandMonths(int code)1514 xmlUCSIsEnclosedCJKLettersandMonths(int code) {
1515     return(((code >= 0x3200) && (code <= 0x32FF)));
1516 }
1517 
1518 /**
1519  * xmlUCSIsEthiopic:
1520  * @code: UCS code point
1521  *
1522  * Check whether the character is part of Ethiopic UCS Block
1523  *
1524  * Returns 1 if true 0 otherwise
1525  */
1526 int
xmlUCSIsEthiopic(int code)1527 xmlUCSIsEthiopic(int code) {
1528     return(((code >= 0x1200) && (code <= 0x137F)));
1529 }
1530 
1531 /**
1532  * xmlUCSIsGeneralPunctuation:
1533  * @code: UCS code point
1534  *
1535  * Check whether the character is part of GeneralPunctuation UCS Block
1536  *
1537  * Returns 1 if true 0 otherwise
1538  */
1539 int
xmlUCSIsGeneralPunctuation(int code)1540 xmlUCSIsGeneralPunctuation(int code) {
1541     return(((code >= 0x2000) && (code <= 0x206F)));
1542 }
1543 
1544 /**
1545  * xmlUCSIsGeometricShapes:
1546  * @code: UCS code point
1547  *
1548  * Check whether the character is part of GeometricShapes UCS Block
1549  *
1550  * Returns 1 if true 0 otherwise
1551  */
1552 int
xmlUCSIsGeometricShapes(int code)1553 xmlUCSIsGeometricShapes(int code) {
1554     return(((code >= 0x25A0) && (code <= 0x25FF)));
1555 }
1556 
1557 /**
1558  * xmlUCSIsGeorgian:
1559  * @code: UCS code point
1560  *
1561  * Check whether the character is part of Georgian UCS Block
1562  *
1563  * Returns 1 if true 0 otherwise
1564  */
1565 int
xmlUCSIsGeorgian(int code)1566 xmlUCSIsGeorgian(int code) {
1567     return(((code >= 0x10A0) && (code <= 0x10FF)));
1568 }
1569 
1570 /**
1571  * xmlUCSIsGothic:
1572  * @code: UCS code point
1573  *
1574  * Check whether the character is part of Gothic UCS Block
1575  *
1576  * Returns 1 if true 0 otherwise
1577  */
1578 int
xmlUCSIsGothic(int code)1579 xmlUCSIsGothic(int code) {
1580     return(((code >= 0x10330) && (code <= 0x1034F)));
1581 }
1582 
1583 /**
1584  * xmlUCSIsGreek:
1585  * @code: UCS code point
1586  *
1587  * Check whether the character is part of Greek UCS Block
1588  *
1589  * Returns 1 if true 0 otherwise
1590  */
1591 int
xmlUCSIsGreek(int code)1592 xmlUCSIsGreek(int code) {
1593     return(((code >= 0x0370) && (code <= 0x03FF)));
1594 }
1595 
1596 /**
1597  * xmlUCSIsGreekExtended:
1598  * @code: UCS code point
1599  *
1600  * Check whether the character is part of GreekExtended UCS Block
1601  *
1602  * Returns 1 if true 0 otherwise
1603  */
1604 int
xmlUCSIsGreekExtended(int code)1605 xmlUCSIsGreekExtended(int code) {
1606     return(((code >= 0x1F00) && (code <= 0x1FFF)));
1607 }
1608 
1609 /**
1610  * xmlUCSIsGreekandCoptic:
1611  * @code: UCS code point
1612  *
1613  * Check whether the character is part of GreekandCoptic UCS Block
1614  *
1615  * Returns 1 if true 0 otherwise
1616  */
1617 int
xmlUCSIsGreekandCoptic(int code)1618 xmlUCSIsGreekandCoptic(int code) {
1619     return(((code >= 0x0370) && (code <= 0x03FF)));
1620 }
1621 
1622 /**
1623  * xmlUCSIsGujarati:
1624  * @code: UCS code point
1625  *
1626  * Check whether the character is part of Gujarati UCS Block
1627  *
1628  * Returns 1 if true 0 otherwise
1629  */
1630 int
xmlUCSIsGujarati(int code)1631 xmlUCSIsGujarati(int code) {
1632     return(((code >= 0x0A80) && (code <= 0x0AFF)));
1633 }
1634 
1635 /**
1636  * xmlUCSIsGurmukhi:
1637  * @code: UCS code point
1638  *
1639  * Check whether the character is part of Gurmukhi UCS Block
1640  *
1641  * Returns 1 if true 0 otherwise
1642  */
1643 int
xmlUCSIsGurmukhi(int code)1644 xmlUCSIsGurmukhi(int code) {
1645     return(((code >= 0x0A00) && (code <= 0x0A7F)));
1646 }
1647 
1648 /**
1649  * xmlUCSIsHalfwidthandFullwidthForms:
1650  * @code: UCS code point
1651  *
1652  * Check whether the character is part of HalfwidthandFullwidthForms UCS Block
1653  *
1654  * Returns 1 if true 0 otherwise
1655  */
1656 int
xmlUCSIsHalfwidthandFullwidthForms(int code)1657 xmlUCSIsHalfwidthandFullwidthForms(int code) {
1658     return(((code >= 0xFF00) && (code <= 0xFFEF)));
1659 }
1660 
1661 /**
1662  * xmlUCSIsHangulCompatibilityJamo:
1663  * @code: UCS code point
1664  *
1665  * Check whether the character is part of HangulCompatibilityJamo UCS Block
1666  *
1667  * Returns 1 if true 0 otherwise
1668  */
1669 int
xmlUCSIsHangulCompatibilityJamo(int code)1670 xmlUCSIsHangulCompatibilityJamo(int code) {
1671     return(((code >= 0x3130) && (code <= 0x318F)));
1672 }
1673 
1674 /**
1675  * xmlUCSIsHangulJamo:
1676  * @code: UCS code point
1677  *
1678  * Check whether the character is part of HangulJamo UCS Block
1679  *
1680  * Returns 1 if true 0 otherwise
1681  */
1682 int
xmlUCSIsHangulJamo(int code)1683 xmlUCSIsHangulJamo(int code) {
1684     return(((code >= 0x1100) && (code <= 0x11FF)));
1685 }
1686 
1687 /**
1688  * xmlUCSIsHangulSyllables:
1689  * @code: UCS code point
1690  *
1691  * Check whether the character is part of HangulSyllables UCS Block
1692  *
1693  * Returns 1 if true 0 otherwise
1694  */
1695 int
xmlUCSIsHangulSyllables(int code)1696 xmlUCSIsHangulSyllables(int code) {
1697     return(((code >= 0xAC00) && (code <= 0xD7AF)));
1698 }
1699 
1700 /**
1701  * xmlUCSIsHanunoo:
1702  * @code: UCS code point
1703  *
1704  * Check whether the character is part of Hanunoo UCS Block
1705  *
1706  * Returns 1 if true 0 otherwise
1707  */
1708 int
xmlUCSIsHanunoo(int code)1709 xmlUCSIsHanunoo(int code) {
1710     return(((code >= 0x1720) && (code <= 0x173F)));
1711 }
1712 
1713 /**
1714  * xmlUCSIsHebrew:
1715  * @code: UCS code point
1716  *
1717  * Check whether the character is part of Hebrew UCS Block
1718  *
1719  * Returns 1 if true 0 otherwise
1720  */
1721 int
xmlUCSIsHebrew(int code)1722 xmlUCSIsHebrew(int code) {
1723     return(((code >= 0x0590) && (code <= 0x05FF)));
1724 }
1725 
1726 /**
1727  * xmlUCSIsHighPrivateUseSurrogates:
1728  * @code: UCS code point
1729  *
1730  * Check whether the character is part of HighPrivateUseSurrogates UCS Block
1731  *
1732  * Returns 1 if true 0 otherwise
1733  */
1734 int
xmlUCSIsHighPrivateUseSurrogates(int code)1735 xmlUCSIsHighPrivateUseSurrogates(int code) {
1736     return(((code >= 0xDB80) && (code <= 0xDBFF)));
1737 }
1738 
1739 /**
1740  * xmlUCSIsHighSurrogates:
1741  * @code: UCS code point
1742  *
1743  * Check whether the character is part of HighSurrogates UCS Block
1744  *
1745  * Returns 1 if true 0 otherwise
1746  */
1747 int
xmlUCSIsHighSurrogates(int code)1748 xmlUCSIsHighSurrogates(int code) {
1749     return(((code >= 0xD800) && (code <= 0xDB7F)));
1750 }
1751 
1752 /**
1753  * xmlUCSIsHiragana:
1754  * @code: UCS code point
1755  *
1756  * Check whether the character is part of Hiragana UCS Block
1757  *
1758  * Returns 1 if true 0 otherwise
1759  */
1760 int
xmlUCSIsHiragana(int code)1761 xmlUCSIsHiragana(int code) {
1762     return(((code >= 0x3040) && (code <= 0x309F)));
1763 }
1764 
1765 /**
1766  * xmlUCSIsIPAExtensions:
1767  * @code: UCS code point
1768  *
1769  * Check whether the character is part of IPAExtensions UCS Block
1770  *
1771  * Returns 1 if true 0 otherwise
1772  */
1773 int
xmlUCSIsIPAExtensions(int code)1774 xmlUCSIsIPAExtensions(int code) {
1775     return(((code >= 0x0250) && (code <= 0x02AF)));
1776 }
1777 
1778 /**
1779  * xmlUCSIsIdeographicDescriptionCharacters:
1780  * @code: UCS code point
1781  *
1782  * Check whether the character is part of IdeographicDescriptionCharacters UCS Block
1783  *
1784  * Returns 1 if true 0 otherwise
1785  */
1786 int
xmlUCSIsIdeographicDescriptionCharacters(int code)1787 xmlUCSIsIdeographicDescriptionCharacters(int code) {
1788     return(((code >= 0x2FF0) && (code <= 0x2FFF)));
1789 }
1790 
1791 /**
1792  * xmlUCSIsKanbun:
1793  * @code: UCS code point
1794  *
1795  * Check whether the character is part of Kanbun UCS Block
1796  *
1797  * Returns 1 if true 0 otherwise
1798  */
1799 int
xmlUCSIsKanbun(int code)1800 xmlUCSIsKanbun(int code) {
1801     return(((code >= 0x3190) && (code <= 0x319F)));
1802 }
1803 
1804 /**
1805  * xmlUCSIsKangxiRadicals:
1806  * @code: UCS code point
1807  *
1808  * Check whether the character is part of KangxiRadicals UCS Block
1809  *
1810  * Returns 1 if true 0 otherwise
1811  */
1812 int
xmlUCSIsKangxiRadicals(int code)1813 xmlUCSIsKangxiRadicals(int code) {
1814     return(((code >= 0x2F00) && (code <= 0x2FDF)));
1815 }
1816 
1817 /**
1818  * xmlUCSIsKannada:
1819  * @code: UCS code point
1820  *
1821  * Check whether the character is part of Kannada UCS Block
1822  *
1823  * Returns 1 if true 0 otherwise
1824  */
1825 int
xmlUCSIsKannada(int code)1826 xmlUCSIsKannada(int code) {
1827     return(((code >= 0x0C80) && (code <= 0x0CFF)));
1828 }
1829 
1830 /**
1831  * xmlUCSIsKatakana:
1832  * @code: UCS code point
1833  *
1834  * Check whether the character is part of Katakana UCS Block
1835  *
1836  * Returns 1 if true 0 otherwise
1837  */
1838 int
xmlUCSIsKatakana(int code)1839 xmlUCSIsKatakana(int code) {
1840     return(((code >= 0x30A0) && (code <= 0x30FF)));
1841 }
1842 
1843 /**
1844  * xmlUCSIsKatakanaPhoneticExtensions:
1845  * @code: UCS code point
1846  *
1847  * Check whether the character is part of KatakanaPhoneticExtensions UCS Block
1848  *
1849  * Returns 1 if true 0 otherwise
1850  */
1851 int
xmlUCSIsKatakanaPhoneticExtensions(int code)1852 xmlUCSIsKatakanaPhoneticExtensions(int code) {
1853     return(((code >= 0x31F0) && (code <= 0x31FF)));
1854 }
1855 
1856 /**
1857  * xmlUCSIsKhmer:
1858  * @code: UCS code point
1859  *
1860  * Check whether the character is part of Khmer UCS Block
1861  *
1862  * Returns 1 if true 0 otherwise
1863  */
1864 int
xmlUCSIsKhmer(int code)1865 xmlUCSIsKhmer(int code) {
1866     return(((code >= 0x1780) && (code <= 0x17FF)));
1867 }
1868 
1869 /**
1870  * xmlUCSIsKhmerSymbols:
1871  * @code: UCS code point
1872  *
1873  * Check whether the character is part of KhmerSymbols UCS Block
1874  *
1875  * Returns 1 if true 0 otherwise
1876  */
1877 int
xmlUCSIsKhmerSymbols(int code)1878 xmlUCSIsKhmerSymbols(int code) {
1879     return(((code >= 0x19E0) && (code <= 0x19FF)));
1880 }
1881 
1882 /**
1883  * xmlUCSIsLao:
1884  * @code: UCS code point
1885  *
1886  * Check whether the character is part of Lao UCS Block
1887  *
1888  * Returns 1 if true 0 otherwise
1889  */
1890 int
xmlUCSIsLao(int code)1891 xmlUCSIsLao(int code) {
1892     return(((code >= 0x0E80) && (code <= 0x0EFF)));
1893 }
1894 
1895 /**
1896  * xmlUCSIsLatin1Supplement:
1897  * @code: UCS code point
1898  *
1899  * Check whether the character is part of Latin-1Supplement UCS Block
1900  *
1901  * Returns 1 if true 0 otherwise
1902  */
1903 int
xmlUCSIsLatin1Supplement(int code)1904 xmlUCSIsLatin1Supplement(int code) {
1905     return(((code >= 0x0080) && (code <= 0x00FF)));
1906 }
1907 
1908 /**
1909  * xmlUCSIsLatinExtendedA:
1910  * @code: UCS code point
1911  *
1912  * Check whether the character is part of LatinExtended-A UCS Block
1913  *
1914  * Returns 1 if true 0 otherwise
1915  */
1916 int
xmlUCSIsLatinExtendedA(int code)1917 xmlUCSIsLatinExtendedA(int code) {
1918     return(((code >= 0x0100) && (code <= 0x017F)));
1919 }
1920 
1921 /**
1922  * xmlUCSIsLatinExtendedB:
1923  * @code: UCS code point
1924  *
1925  * Check whether the character is part of LatinExtended-B UCS Block
1926  *
1927  * Returns 1 if true 0 otherwise
1928  */
1929 int
xmlUCSIsLatinExtendedB(int code)1930 xmlUCSIsLatinExtendedB(int code) {
1931     return(((code >= 0x0180) && (code <= 0x024F)));
1932 }
1933 
1934 /**
1935  * xmlUCSIsLatinExtendedAdditional:
1936  * @code: UCS code point
1937  *
1938  * Check whether the character is part of LatinExtendedAdditional UCS Block
1939  *
1940  * Returns 1 if true 0 otherwise
1941  */
1942 int
xmlUCSIsLatinExtendedAdditional(int code)1943 xmlUCSIsLatinExtendedAdditional(int code) {
1944     return(((code >= 0x1E00) && (code <= 0x1EFF)));
1945 }
1946 
1947 /**
1948  * xmlUCSIsLetterlikeSymbols:
1949  * @code: UCS code point
1950  *
1951  * Check whether the character is part of LetterlikeSymbols UCS Block
1952  *
1953  * Returns 1 if true 0 otherwise
1954  */
1955 int
xmlUCSIsLetterlikeSymbols(int code)1956 xmlUCSIsLetterlikeSymbols(int code) {
1957     return(((code >= 0x2100) && (code <= 0x214F)));
1958 }
1959 
1960 /**
1961  * xmlUCSIsLimbu:
1962  * @code: UCS code point
1963  *
1964  * Check whether the character is part of Limbu UCS Block
1965  *
1966  * Returns 1 if true 0 otherwise
1967  */
1968 int
xmlUCSIsLimbu(int code)1969 xmlUCSIsLimbu(int code) {
1970     return(((code >= 0x1900) && (code <= 0x194F)));
1971 }
1972 
1973 /**
1974  * xmlUCSIsLinearBIdeograms:
1975  * @code: UCS code point
1976  *
1977  * Check whether the character is part of LinearBIdeograms UCS Block
1978  *
1979  * Returns 1 if true 0 otherwise
1980  */
1981 int
xmlUCSIsLinearBIdeograms(int code)1982 xmlUCSIsLinearBIdeograms(int code) {
1983     return(((code >= 0x10080) && (code <= 0x100FF)));
1984 }
1985 
1986 /**
1987  * xmlUCSIsLinearBSyllabary:
1988  * @code: UCS code point
1989  *
1990  * Check whether the character is part of LinearBSyllabary UCS Block
1991  *
1992  * Returns 1 if true 0 otherwise
1993  */
1994 int
xmlUCSIsLinearBSyllabary(int code)1995 xmlUCSIsLinearBSyllabary(int code) {
1996     return(((code >= 0x10000) && (code <= 0x1007F)));
1997 }
1998 
1999 /**
2000  * xmlUCSIsLowSurrogates:
2001  * @code: UCS code point
2002  *
2003  * Check whether the character is part of LowSurrogates UCS Block
2004  *
2005  * Returns 1 if true 0 otherwise
2006  */
2007 int
xmlUCSIsLowSurrogates(int code)2008 xmlUCSIsLowSurrogates(int code) {
2009     return(((code >= 0xDC00) && (code <= 0xDFFF)));
2010 }
2011 
2012 /**
2013  * xmlUCSIsMalayalam:
2014  * @code: UCS code point
2015  *
2016  * Check whether the character is part of Malayalam UCS Block
2017  *
2018  * Returns 1 if true 0 otherwise
2019  */
2020 int
xmlUCSIsMalayalam(int code)2021 xmlUCSIsMalayalam(int code) {
2022     return(((code >= 0x0D00) && (code <= 0x0D7F)));
2023 }
2024 
2025 /**
2026  * xmlUCSIsMathematicalAlphanumericSymbols:
2027  * @code: UCS code point
2028  *
2029  * Check whether the character is part of MathematicalAlphanumericSymbols UCS Block
2030  *
2031  * Returns 1 if true 0 otherwise
2032  */
2033 int
xmlUCSIsMathematicalAlphanumericSymbols(int code)2034 xmlUCSIsMathematicalAlphanumericSymbols(int code) {
2035     return(((code >= 0x1D400) && (code <= 0x1D7FF)));
2036 }
2037 
2038 /**
2039  * xmlUCSIsMathematicalOperators:
2040  * @code: UCS code point
2041  *
2042  * Check whether the character is part of MathematicalOperators UCS Block
2043  *
2044  * Returns 1 if true 0 otherwise
2045  */
2046 int
xmlUCSIsMathematicalOperators(int code)2047 xmlUCSIsMathematicalOperators(int code) {
2048     return(((code >= 0x2200) && (code <= 0x22FF)));
2049 }
2050 
2051 /**
2052  * xmlUCSIsMiscellaneousMathematicalSymbolsA:
2053  * @code: UCS code point
2054  *
2055  * Check whether the character is part of MiscellaneousMathematicalSymbols-A UCS Block
2056  *
2057  * Returns 1 if true 0 otherwise
2058  */
2059 int
xmlUCSIsMiscellaneousMathematicalSymbolsA(int code)2060 xmlUCSIsMiscellaneousMathematicalSymbolsA(int code) {
2061     return(((code >= 0x27C0) && (code <= 0x27EF)));
2062 }
2063 
2064 /**
2065  * xmlUCSIsMiscellaneousMathematicalSymbolsB:
2066  * @code: UCS code point
2067  *
2068  * Check whether the character is part of MiscellaneousMathematicalSymbols-B UCS Block
2069  *
2070  * Returns 1 if true 0 otherwise
2071  */
2072 int
xmlUCSIsMiscellaneousMathematicalSymbolsB(int code)2073 xmlUCSIsMiscellaneousMathematicalSymbolsB(int code) {
2074     return(((code >= 0x2980) && (code <= 0x29FF)));
2075 }
2076 
2077 /**
2078  * xmlUCSIsMiscellaneousSymbols:
2079  * @code: UCS code point
2080  *
2081  * Check whether the character is part of MiscellaneousSymbols UCS Block
2082  *
2083  * Returns 1 if true 0 otherwise
2084  */
2085 int
xmlUCSIsMiscellaneousSymbols(int code)2086 xmlUCSIsMiscellaneousSymbols(int code) {
2087     return(((code >= 0x2600) && (code <= 0x26FF)));
2088 }
2089 
2090 /**
2091  * xmlUCSIsMiscellaneousSymbolsandArrows:
2092  * @code: UCS code point
2093  *
2094  * Check whether the character is part of MiscellaneousSymbolsandArrows UCS Block
2095  *
2096  * Returns 1 if true 0 otherwise
2097  */
2098 int
xmlUCSIsMiscellaneousSymbolsandArrows(int code)2099 xmlUCSIsMiscellaneousSymbolsandArrows(int code) {
2100     return(((code >= 0x2B00) && (code <= 0x2BFF)));
2101 }
2102 
2103 /**
2104  * xmlUCSIsMiscellaneousTechnical:
2105  * @code: UCS code point
2106  *
2107  * Check whether the character is part of MiscellaneousTechnical UCS Block
2108  *
2109  * Returns 1 if true 0 otherwise
2110  */
2111 int
xmlUCSIsMiscellaneousTechnical(int code)2112 xmlUCSIsMiscellaneousTechnical(int code) {
2113     return(((code >= 0x2300) && (code <= 0x23FF)));
2114 }
2115 
2116 /**
2117  * xmlUCSIsMongolian:
2118  * @code: UCS code point
2119  *
2120  * Check whether the character is part of Mongolian UCS Block
2121  *
2122  * Returns 1 if true 0 otherwise
2123  */
2124 int
xmlUCSIsMongolian(int code)2125 xmlUCSIsMongolian(int code) {
2126     return(((code >= 0x1800) && (code <= 0x18AF)));
2127 }
2128 
2129 /**
2130  * xmlUCSIsMusicalSymbols:
2131  * @code: UCS code point
2132  *
2133  * Check whether the character is part of MusicalSymbols UCS Block
2134  *
2135  * Returns 1 if true 0 otherwise
2136  */
2137 int
xmlUCSIsMusicalSymbols(int code)2138 xmlUCSIsMusicalSymbols(int code) {
2139     return(((code >= 0x1D100) && (code <= 0x1D1FF)));
2140 }
2141 
2142 /**
2143  * xmlUCSIsMyanmar:
2144  * @code: UCS code point
2145  *
2146  * Check whether the character is part of Myanmar UCS Block
2147  *
2148  * Returns 1 if true 0 otherwise
2149  */
2150 int
xmlUCSIsMyanmar(int code)2151 xmlUCSIsMyanmar(int code) {
2152     return(((code >= 0x1000) && (code <= 0x109F)));
2153 }
2154 
2155 /**
2156  * xmlUCSIsNumberForms:
2157  * @code: UCS code point
2158  *
2159  * Check whether the character is part of NumberForms UCS Block
2160  *
2161  * Returns 1 if true 0 otherwise
2162  */
2163 int
xmlUCSIsNumberForms(int code)2164 xmlUCSIsNumberForms(int code) {
2165     return(((code >= 0x2150) && (code <= 0x218F)));
2166 }
2167 
2168 /**
2169  * xmlUCSIsOgham:
2170  * @code: UCS code point
2171  *
2172  * Check whether the character is part of Ogham UCS Block
2173  *
2174  * Returns 1 if true 0 otherwise
2175  */
2176 int
xmlUCSIsOgham(int code)2177 xmlUCSIsOgham(int code) {
2178     return(((code >= 0x1680) && (code <= 0x169F)));
2179 }
2180 
2181 /**
2182  * xmlUCSIsOldItalic:
2183  * @code: UCS code point
2184  *
2185  * Check whether the character is part of OldItalic UCS Block
2186  *
2187  * Returns 1 if true 0 otherwise
2188  */
2189 int
xmlUCSIsOldItalic(int code)2190 xmlUCSIsOldItalic(int code) {
2191     return(((code >= 0x10300) && (code <= 0x1032F)));
2192 }
2193 
2194 /**
2195  * xmlUCSIsOpticalCharacterRecognition:
2196  * @code: UCS code point
2197  *
2198  * Check whether the character is part of OpticalCharacterRecognition UCS Block
2199  *
2200  * Returns 1 if true 0 otherwise
2201  */
2202 int
xmlUCSIsOpticalCharacterRecognition(int code)2203 xmlUCSIsOpticalCharacterRecognition(int code) {
2204     return(((code >= 0x2440) && (code <= 0x245F)));
2205 }
2206 
2207 /**
2208  * xmlUCSIsOriya:
2209  * @code: UCS code point
2210  *
2211  * Check whether the character is part of Oriya UCS Block
2212  *
2213  * Returns 1 if true 0 otherwise
2214  */
2215 int
xmlUCSIsOriya(int code)2216 xmlUCSIsOriya(int code) {
2217     return(((code >= 0x0B00) && (code <= 0x0B7F)));
2218 }
2219 
2220 /**
2221  * xmlUCSIsOsmanya:
2222  * @code: UCS code point
2223  *
2224  * Check whether the character is part of Osmanya UCS Block
2225  *
2226  * Returns 1 if true 0 otherwise
2227  */
2228 int
xmlUCSIsOsmanya(int code)2229 xmlUCSIsOsmanya(int code) {
2230     return(((code >= 0x10480) && (code <= 0x104AF)));
2231 }
2232 
2233 /**
2234  * xmlUCSIsPhoneticExtensions:
2235  * @code: UCS code point
2236  *
2237  * Check whether the character is part of PhoneticExtensions UCS Block
2238  *
2239  * Returns 1 if true 0 otherwise
2240  */
2241 int
xmlUCSIsPhoneticExtensions(int code)2242 xmlUCSIsPhoneticExtensions(int code) {
2243     return(((code >= 0x1D00) && (code <= 0x1D7F)));
2244 }
2245 
2246 /**
2247  * xmlUCSIsPrivateUse:
2248  * @code: UCS code point
2249  *
2250  * Check whether the character is part of PrivateUse UCS Block
2251  *
2252  * Returns 1 if true 0 otherwise
2253  */
2254 int
xmlUCSIsPrivateUse(int code)2255 xmlUCSIsPrivateUse(int code) {
2256     return(((code >= 0xE000) && (code <= 0xF8FF)) ||
2257            ((code >= 0xF0000) && (code <= 0xFFFFF)) ||
2258            ((code >= 0x100000) && (code <= 0x10FFFF)));
2259 }
2260 
2261 /**
2262  * xmlUCSIsPrivateUseArea:
2263  * @code: UCS code point
2264  *
2265  * Check whether the character is part of PrivateUseArea UCS Block
2266  *
2267  * Returns 1 if true 0 otherwise
2268  */
2269 int
xmlUCSIsPrivateUseArea(int code)2270 xmlUCSIsPrivateUseArea(int code) {
2271     return(((code >= 0xE000) && (code <= 0xF8FF)));
2272 }
2273 
2274 /**
2275  * xmlUCSIsRunic:
2276  * @code: UCS code point
2277  *
2278  * Check whether the character is part of Runic UCS Block
2279  *
2280  * Returns 1 if true 0 otherwise
2281  */
2282 int
xmlUCSIsRunic(int code)2283 xmlUCSIsRunic(int code) {
2284     return(((code >= 0x16A0) && (code <= 0x16FF)));
2285 }
2286 
2287 /**
2288  * xmlUCSIsShavian:
2289  * @code: UCS code point
2290  *
2291  * Check whether the character is part of Shavian UCS Block
2292  *
2293  * Returns 1 if true 0 otherwise
2294  */
2295 int
xmlUCSIsShavian(int code)2296 xmlUCSIsShavian(int code) {
2297     return(((code >= 0x10450) && (code <= 0x1047F)));
2298 }
2299 
2300 /**
2301  * xmlUCSIsSinhala:
2302  * @code: UCS code point
2303  *
2304  * Check whether the character is part of Sinhala UCS Block
2305  *
2306  * Returns 1 if true 0 otherwise
2307  */
2308 int
xmlUCSIsSinhala(int code)2309 xmlUCSIsSinhala(int code) {
2310     return(((code >= 0x0D80) && (code <= 0x0DFF)));
2311 }
2312 
2313 /**
2314  * xmlUCSIsSmallFormVariants:
2315  * @code: UCS code point
2316  *
2317  * Check whether the character is part of SmallFormVariants UCS Block
2318  *
2319  * Returns 1 if true 0 otherwise
2320  */
2321 int
xmlUCSIsSmallFormVariants(int code)2322 xmlUCSIsSmallFormVariants(int code) {
2323     return(((code >= 0xFE50) && (code <= 0xFE6F)));
2324 }
2325 
2326 /**
2327  * xmlUCSIsSpacingModifierLetters:
2328  * @code: UCS code point
2329  *
2330  * Check whether the character is part of SpacingModifierLetters UCS Block
2331  *
2332  * Returns 1 if true 0 otherwise
2333  */
2334 int
xmlUCSIsSpacingModifierLetters(int code)2335 xmlUCSIsSpacingModifierLetters(int code) {
2336     return(((code >= 0x02B0) && (code <= 0x02FF)));
2337 }
2338 
2339 /**
2340  * xmlUCSIsSpecials:
2341  * @code: UCS code point
2342  *
2343  * Check whether the character is part of Specials UCS Block
2344  *
2345  * Returns 1 if true 0 otherwise
2346  */
2347 int
xmlUCSIsSpecials(int code)2348 xmlUCSIsSpecials(int code) {
2349     return(((code >= 0xFFF0) && (code <= 0xFFFF)));
2350 }
2351 
2352 /**
2353  * xmlUCSIsSuperscriptsandSubscripts:
2354  * @code: UCS code point
2355  *
2356  * Check whether the character is part of SuperscriptsandSubscripts UCS Block
2357  *
2358  * Returns 1 if true 0 otherwise
2359  */
2360 int
xmlUCSIsSuperscriptsandSubscripts(int code)2361 xmlUCSIsSuperscriptsandSubscripts(int code) {
2362     return(((code >= 0x2070) && (code <= 0x209F)));
2363 }
2364 
2365 /**
2366  * xmlUCSIsSupplementalArrowsA:
2367  * @code: UCS code point
2368  *
2369  * Check whether the character is part of SupplementalArrows-A UCS Block
2370  *
2371  * Returns 1 if true 0 otherwise
2372  */
2373 int
xmlUCSIsSupplementalArrowsA(int code)2374 xmlUCSIsSupplementalArrowsA(int code) {
2375     return(((code >= 0x27F0) && (code <= 0x27FF)));
2376 }
2377 
2378 /**
2379  * xmlUCSIsSupplementalArrowsB:
2380  * @code: UCS code point
2381  *
2382  * Check whether the character is part of SupplementalArrows-B UCS Block
2383  *
2384  * Returns 1 if true 0 otherwise
2385  */
2386 int
xmlUCSIsSupplementalArrowsB(int code)2387 xmlUCSIsSupplementalArrowsB(int code) {
2388     return(((code >= 0x2900) && (code <= 0x297F)));
2389 }
2390 
2391 /**
2392  * xmlUCSIsSupplementalMathematicalOperators:
2393  * @code: UCS code point
2394  *
2395  * Check whether the character is part of SupplementalMathematicalOperators UCS Block
2396  *
2397  * Returns 1 if true 0 otherwise
2398  */
2399 int
xmlUCSIsSupplementalMathematicalOperators(int code)2400 xmlUCSIsSupplementalMathematicalOperators(int code) {
2401     return(((code >= 0x2A00) && (code <= 0x2AFF)));
2402 }
2403 
2404 /**
2405  * xmlUCSIsSupplementaryPrivateUseAreaA:
2406  * @code: UCS code point
2407  *
2408  * Check whether the character is part of SupplementaryPrivateUseArea-A UCS Block
2409  *
2410  * Returns 1 if true 0 otherwise
2411  */
2412 int
xmlUCSIsSupplementaryPrivateUseAreaA(int code)2413 xmlUCSIsSupplementaryPrivateUseAreaA(int code) {
2414     return(((code >= 0xF0000) && (code <= 0xFFFFF)));
2415 }
2416 
2417 /**
2418  * xmlUCSIsSupplementaryPrivateUseAreaB:
2419  * @code: UCS code point
2420  *
2421  * Check whether the character is part of SupplementaryPrivateUseArea-B UCS Block
2422  *
2423  * Returns 1 if true 0 otherwise
2424  */
2425 int
xmlUCSIsSupplementaryPrivateUseAreaB(int code)2426 xmlUCSIsSupplementaryPrivateUseAreaB(int code) {
2427     return(((code >= 0x100000) && (code <= 0x10FFFF)));
2428 }
2429 
2430 /**
2431  * xmlUCSIsSyriac:
2432  * @code: UCS code point
2433  *
2434  * Check whether the character is part of Syriac UCS Block
2435  *
2436  * Returns 1 if true 0 otherwise
2437  */
2438 int
xmlUCSIsSyriac(int code)2439 xmlUCSIsSyriac(int code) {
2440     return(((code >= 0x0700) && (code <= 0x074F)));
2441 }
2442 
2443 /**
2444  * xmlUCSIsTagalog:
2445  * @code: UCS code point
2446  *
2447  * Check whether the character is part of Tagalog UCS Block
2448  *
2449  * Returns 1 if true 0 otherwise
2450  */
2451 int
xmlUCSIsTagalog(int code)2452 xmlUCSIsTagalog(int code) {
2453     return(((code >= 0x1700) && (code <= 0x171F)));
2454 }
2455 
2456 /**
2457  * xmlUCSIsTagbanwa:
2458  * @code: UCS code point
2459  *
2460  * Check whether the character is part of Tagbanwa UCS Block
2461  *
2462  * Returns 1 if true 0 otherwise
2463  */
2464 int
xmlUCSIsTagbanwa(int code)2465 xmlUCSIsTagbanwa(int code) {
2466     return(((code >= 0x1760) && (code <= 0x177F)));
2467 }
2468 
2469 /**
2470  * xmlUCSIsTags:
2471  * @code: UCS code point
2472  *
2473  * Check whether the character is part of Tags UCS Block
2474  *
2475  * Returns 1 if true 0 otherwise
2476  */
2477 int
xmlUCSIsTags(int code)2478 xmlUCSIsTags(int code) {
2479     return(((code >= 0xE0000) && (code <= 0xE007F)));
2480 }
2481 
2482 /**
2483  * xmlUCSIsTaiLe:
2484  * @code: UCS code point
2485  *
2486  * Check whether the character is part of TaiLe UCS Block
2487  *
2488  * Returns 1 if true 0 otherwise
2489  */
2490 int
xmlUCSIsTaiLe(int code)2491 xmlUCSIsTaiLe(int code) {
2492     return(((code >= 0x1950) && (code <= 0x197F)));
2493 }
2494 
2495 /**
2496  * xmlUCSIsTaiXuanJingSymbols:
2497  * @code: UCS code point
2498  *
2499  * Check whether the character is part of TaiXuanJingSymbols UCS Block
2500  *
2501  * Returns 1 if true 0 otherwise
2502  */
2503 int
xmlUCSIsTaiXuanJingSymbols(int code)2504 xmlUCSIsTaiXuanJingSymbols(int code) {
2505     return(((code >= 0x1D300) && (code <= 0x1D35F)));
2506 }
2507 
2508 /**
2509  * xmlUCSIsTamil:
2510  * @code: UCS code point
2511  *
2512  * Check whether the character is part of Tamil UCS Block
2513  *
2514  * Returns 1 if true 0 otherwise
2515  */
2516 int
xmlUCSIsTamil(int code)2517 xmlUCSIsTamil(int code) {
2518     return(((code >= 0x0B80) && (code <= 0x0BFF)));
2519 }
2520 
2521 /**
2522  * xmlUCSIsTelugu:
2523  * @code: UCS code point
2524  *
2525  * Check whether the character is part of Telugu UCS Block
2526  *
2527  * Returns 1 if true 0 otherwise
2528  */
2529 int
xmlUCSIsTelugu(int code)2530 xmlUCSIsTelugu(int code) {
2531     return(((code >= 0x0C00) && (code <= 0x0C7F)));
2532 }
2533 
2534 /**
2535  * xmlUCSIsThaana:
2536  * @code: UCS code point
2537  *
2538  * Check whether the character is part of Thaana UCS Block
2539  *
2540  * Returns 1 if true 0 otherwise
2541  */
2542 int
xmlUCSIsThaana(int code)2543 xmlUCSIsThaana(int code) {
2544     return(((code >= 0x0780) && (code <= 0x07BF)));
2545 }
2546 
2547 /**
2548  * xmlUCSIsThai:
2549  * @code: UCS code point
2550  *
2551  * Check whether the character is part of Thai UCS Block
2552  *
2553  * Returns 1 if true 0 otherwise
2554  */
2555 int
xmlUCSIsThai(int code)2556 xmlUCSIsThai(int code) {
2557     return(((code >= 0x0E00) && (code <= 0x0E7F)));
2558 }
2559 
2560 /**
2561  * xmlUCSIsTibetan:
2562  * @code: UCS code point
2563  *
2564  * Check whether the character is part of Tibetan UCS Block
2565  *
2566  * Returns 1 if true 0 otherwise
2567  */
2568 int
xmlUCSIsTibetan(int code)2569 xmlUCSIsTibetan(int code) {
2570     return(((code >= 0x0F00) && (code <= 0x0FFF)));
2571 }
2572 
2573 /**
2574  * xmlUCSIsUgaritic:
2575  * @code: UCS code point
2576  *
2577  * Check whether the character is part of Ugaritic UCS Block
2578  *
2579  * Returns 1 if true 0 otherwise
2580  */
2581 int
xmlUCSIsUgaritic(int code)2582 xmlUCSIsUgaritic(int code) {
2583     return(((code >= 0x10380) && (code <= 0x1039F)));
2584 }
2585 
2586 /**
2587  * xmlUCSIsUnifiedCanadianAboriginalSyllabics:
2588  * @code: UCS code point
2589  *
2590  * Check whether the character is part of UnifiedCanadianAboriginalSyllabics UCS Block
2591  *
2592  * Returns 1 if true 0 otherwise
2593  */
2594 int
xmlUCSIsUnifiedCanadianAboriginalSyllabics(int code)2595 xmlUCSIsUnifiedCanadianAboriginalSyllabics(int code) {
2596     return(((code >= 0x1400) && (code <= 0x167F)));
2597 }
2598 
2599 /**
2600  * xmlUCSIsVariationSelectors:
2601  * @code: UCS code point
2602  *
2603  * Check whether the character is part of VariationSelectors UCS Block
2604  *
2605  * Returns 1 if true 0 otherwise
2606  */
2607 int
xmlUCSIsVariationSelectors(int code)2608 xmlUCSIsVariationSelectors(int code) {
2609     return(((code >= 0xFE00) && (code <= 0xFE0F)));
2610 }
2611 
2612 /**
2613  * xmlUCSIsVariationSelectorsSupplement:
2614  * @code: UCS code point
2615  *
2616  * Check whether the character is part of VariationSelectorsSupplement UCS Block
2617  *
2618  * Returns 1 if true 0 otherwise
2619  */
2620 int
xmlUCSIsVariationSelectorsSupplement(int code)2621 xmlUCSIsVariationSelectorsSupplement(int code) {
2622     return(((code >= 0xE0100) && (code <= 0xE01EF)));
2623 }
2624 
2625 /**
2626  * xmlUCSIsYiRadicals:
2627  * @code: UCS code point
2628  *
2629  * Check whether the character is part of YiRadicals UCS Block
2630  *
2631  * Returns 1 if true 0 otherwise
2632  */
2633 int
xmlUCSIsYiRadicals(int code)2634 xmlUCSIsYiRadicals(int code) {
2635     return(((code >= 0xA490) && (code <= 0xA4CF)));
2636 }
2637 
2638 /**
2639  * xmlUCSIsYiSyllables:
2640  * @code: UCS code point
2641  *
2642  * Check whether the character is part of YiSyllables UCS Block
2643  *
2644  * Returns 1 if true 0 otherwise
2645  */
2646 int
xmlUCSIsYiSyllables(int code)2647 xmlUCSIsYiSyllables(int code) {
2648     return(((code >= 0xA000) && (code <= 0xA48F)));
2649 }
2650 
2651 /**
2652  * xmlUCSIsYijingHexagramSymbols:
2653  * @code: UCS code point
2654  *
2655  * Check whether the character is part of YijingHexagramSymbols UCS Block
2656  *
2657  * Returns 1 if true 0 otherwise
2658  */
2659 int
xmlUCSIsYijingHexagramSymbols(int code)2660 xmlUCSIsYijingHexagramSymbols(int code) {
2661     return(((code >= 0x4DC0) && (code <= 0x4DFF)));
2662 }
2663 
2664 /**
2665  * xmlUCSIsBlock:
2666  * @code: UCS code point
2667  * @block: UCS block name
2668  *
2669  * Check whether the character is part of the UCS Block
2670  *
2671  * Returns 1 if true, 0 if false and -1 on unknown block
2672  */
2673 int
xmlUCSIsBlock(int code,const char * block)2674 xmlUCSIsBlock(int code, const char *block) {
2675     xmlIntFunc *func;
2676 
2677     func = xmlUnicodeLookup(&xmlUnicodeBlockTbl, block);
2678     if (func == NULL)
2679 	return (-1);
2680     return (func(code));
2681 }
2682 
2683 /**
2684  * xmlUCSIsCatC:
2685  * @code: UCS code point
2686  *
2687  * Check whether the character is part of C UCS Category
2688  *
2689  * Returns 1 if true 0 otherwise
2690  */
2691 int
xmlUCSIsCatC(int code)2692 xmlUCSIsCatC(int code) {
2693     return(xmlCharInRange((unsigned int)code, &xmlCG));
2694 }
2695 
2696 /**
2697  * xmlUCSIsCatCc:
2698  * @code: UCS code point
2699  *
2700  * Check whether the character is part of Cc UCS Category
2701  *
2702  * Returns 1 if true 0 otherwise
2703  */
2704 int
xmlUCSIsCatCc(int code)2705 xmlUCSIsCatCc(int code) {
2706     return(((code >= 0x0) && (code <= 0x1f)) ||
2707            ((code >= 0x7f) && (code <= 0x9f)));
2708 }
2709 
2710 /**
2711  * xmlUCSIsCatCf:
2712  * @code: UCS code point
2713  *
2714  * Check whether the character is part of Cf UCS Category
2715  *
2716  * Returns 1 if true 0 otherwise
2717  */
2718 int
xmlUCSIsCatCf(int code)2719 xmlUCSIsCatCf(int code) {
2720     return(xmlCharInRange((unsigned int)code, &xmlCfG));
2721 }
2722 
2723 /**
2724  * xmlUCSIsCatCo:
2725  * @code: UCS code point
2726  *
2727  * Check whether the character is part of Co UCS Category
2728  *
2729  * Returns 1 if true 0 otherwise
2730  */
2731 int
xmlUCSIsCatCo(int code)2732 xmlUCSIsCatCo(int code) {
2733     return((code == 0xe000) ||
2734            (code == 0xf8ff) ||
2735            (code == 0xf0000) ||
2736            (code == 0xffffd) ||
2737            (code == 0x100000) ||
2738            (code == 0x10fffd));
2739 }
2740 
2741 /**
2742  * xmlUCSIsCatCs:
2743  * @code: UCS code point
2744  *
2745  * Check whether the character is part of Cs UCS Category
2746  *
2747  * Returns 1 if true 0 otherwise
2748  */
2749 int
xmlUCSIsCatCs(int code)2750 xmlUCSIsCatCs(int code) {
2751     return((code == 0xd800) ||
2752            ((code >= 0xdb7f) && (code <= 0xdb80)) ||
2753            ((code >= 0xdbff) && (code <= 0xdc00)) ||
2754            (code == 0xdfff));
2755 }
2756 
2757 /**
2758  * xmlUCSIsCatL:
2759  * @code: UCS code point
2760  *
2761  * Check whether the character is part of L UCS Category
2762  *
2763  * Returns 1 if true 0 otherwise
2764  */
2765 int
xmlUCSIsCatL(int code)2766 xmlUCSIsCatL(int code) {
2767     return(xmlCharInRange((unsigned int)code, &xmlLG));
2768 }
2769 
2770 /**
2771  * xmlUCSIsCatLl:
2772  * @code: UCS code point
2773  *
2774  * Check whether the character is part of Ll UCS Category
2775  *
2776  * Returns 1 if true 0 otherwise
2777  */
2778 int
xmlUCSIsCatLl(int code)2779 xmlUCSIsCatLl(int code) {
2780     return(xmlCharInRange((unsigned int)code, &xmlLlG));
2781 }
2782 
2783 /**
2784  * xmlUCSIsCatLm:
2785  * @code: UCS code point
2786  *
2787  * Check whether the character is part of Lm UCS Category
2788  *
2789  * Returns 1 if true 0 otherwise
2790  */
2791 int
xmlUCSIsCatLm(int code)2792 xmlUCSIsCatLm(int code) {
2793     return(xmlCharInRange((unsigned int)code, &xmlLmG));
2794 }
2795 
2796 /**
2797  * xmlUCSIsCatLo:
2798  * @code: UCS code point
2799  *
2800  * Check whether the character is part of Lo UCS Category
2801  *
2802  * Returns 1 if true 0 otherwise
2803  */
2804 int
xmlUCSIsCatLo(int code)2805 xmlUCSIsCatLo(int code) {
2806     return(xmlCharInRange((unsigned int)code, &xmlLoG));
2807 }
2808 
2809 /**
2810  * xmlUCSIsCatLt:
2811  * @code: UCS code point
2812  *
2813  * Check whether the character is part of Lt UCS Category
2814  *
2815  * Returns 1 if true 0 otherwise
2816  */
2817 int
xmlUCSIsCatLt(int code)2818 xmlUCSIsCatLt(int code) {
2819     return(xmlCharInRange((unsigned int)code, &xmlLtG));
2820 }
2821 
2822 /**
2823  * xmlUCSIsCatLu:
2824  * @code: UCS code point
2825  *
2826  * Check whether the character is part of Lu UCS Category
2827  *
2828  * Returns 1 if true 0 otherwise
2829  */
2830 int
xmlUCSIsCatLu(int code)2831 xmlUCSIsCatLu(int code) {
2832     return(xmlCharInRange((unsigned int)code, &xmlLuG));
2833 }
2834 
2835 /**
2836  * xmlUCSIsCatM:
2837  * @code: UCS code point
2838  *
2839  * Check whether the character is part of M UCS Category
2840  *
2841  * Returns 1 if true 0 otherwise
2842  */
2843 int
xmlUCSIsCatM(int code)2844 xmlUCSIsCatM(int code) {
2845     return(xmlCharInRange((unsigned int)code, &xmlMG));
2846 }
2847 
2848 /**
2849  * xmlUCSIsCatMc:
2850  * @code: UCS code point
2851  *
2852  * Check whether the character is part of Mc UCS Category
2853  *
2854  * Returns 1 if true 0 otherwise
2855  */
2856 int
xmlUCSIsCatMc(int code)2857 xmlUCSIsCatMc(int code) {
2858     return(xmlCharInRange((unsigned int)code, &xmlMcG));
2859 }
2860 
2861 /**
2862  * xmlUCSIsCatMe:
2863  * @code: UCS code point
2864  *
2865  * Check whether the character is part of Me UCS Category
2866  *
2867  * Returns 1 if true 0 otherwise
2868  */
2869 int
xmlUCSIsCatMe(int code)2870 xmlUCSIsCatMe(int code) {
2871     return(((code >= 0x488) && (code <= 0x489)) ||
2872            (code == 0x6de) ||
2873            ((code >= 0x20dd) && (code <= 0x20e0)) ||
2874            ((code >= 0x20e2) && (code <= 0x20e4)));
2875 }
2876 
2877 /**
2878  * xmlUCSIsCatMn:
2879  * @code: UCS code point
2880  *
2881  * Check whether the character is part of Mn UCS Category
2882  *
2883  * Returns 1 if true 0 otherwise
2884  */
2885 int
xmlUCSIsCatMn(int code)2886 xmlUCSIsCatMn(int code) {
2887     return(xmlCharInRange((unsigned int)code, &xmlMnG));
2888 }
2889 
2890 /**
2891  * xmlUCSIsCatN:
2892  * @code: UCS code point
2893  *
2894  * Check whether the character is part of N UCS Category
2895  *
2896  * Returns 1 if true 0 otherwise
2897  */
2898 int
xmlUCSIsCatN(int code)2899 xmlUCSIsCatN(int code) {
2900     return(xmlCharInRange((unsigned int)code, &xmlNG));
2901 }
2902 
2903 /**
2904  * xmlUCSIsCatNd:
2905  * @code: UCS code point
2906  *
2907  * Check whether the character is part of Nd UCS Category
2908  *
2909  * Returns 1 if true 0 otherwise
2910  */
2911 int
xmlUCSIsCatNd(int code)2912 xmlUCSIsCatNd(int code) {
2913     return(xmlCharInRange((unsigned int)code, &xmlNdG));
2914 }
2915 
2916 /**
2917  * xmlUCSIsCatNl:
2918  * @code: UCS code point
2919  *
2920  * Check whether the character is part of Nl UCS Category
2921  *
2922  * Returns 1 if true 0 otherwise
2923  */
2924 int
xmlUCSIsCatNl(int code)2925 xmlUCSIsCatNl(int code) {
2926     return(((code >= 0x16ee) && (code <= 0x16f0)) ||
2927            ((code >= 0x2160) && (code <= 0x2183)) ||
2928            (code == 0x3007) ||
2929            ((code >= 0x3021) && (code <= 0x3029)) ||
2930            ((code >= 0x3038) && (code <= 0x303a)) ||
2931            (code == 0x1034a));
2932 }
2933 
2934 /**
2935  * xmlUCSIsCatNo:
2936  * @code: UCS code point
2937  *
2938  * Check whether the character is part of No UCS Category
2939  *
2940  * Returns 1 if true 0 otherwise
2941  */
2942 int
xmlUCSIsCatNo(int code)2943 xmlUCSIsCatNo(int code) {
2944     return(xmlCharInRange((unsigned int)code, &xmlNoG));
2945 }
2946 
2947 /**
2948  * xmlUCSIsCatP:
2949  * @code: UCS code point
2950  *
2951  * Check whether the character is part of P UCS Category
2952  *
2953  * Returns 1 if true 0 otherwise
2954  */
2955 int
xmlUCSIsCatP(int code)2956 xmlUCSIsCatP(int code) {
2957     return(xmlCharInRange((unsigned int)code, &xmlPG));
2958 }
2959 
2960 /**
2961  * xmlUCSIsCatPc:
2962  * @code: UCS code point
2963  *
2964  * Check whether the character is part of Pc UCS Category
2965  *
2966  * Returns 1 if true 0 otherwise
2967  */
2968 int
xmlUCSIsCatPc(int code)2969 xmlUCSIsCatPc(int code) {
2970     return((code == 0x5f) ||
2971            ((code >= 0x203f) && (code <= 0x2040)) ||
2972            (code == 0x2054) ||
2973            (code == 0x30fb) ||
2974            ((code >= 0xfe33) && (code <= 0xfe34)) ||
2975            ((code >= 0xfe4d) && (code <= 0xfe4f)) ||
2976            (code == 0xff3f) ||
2977            (code == 0xff65));
2978 }
2979 
2980 /**
2981  * xmlUCSIsCatPd:
2982  * @code: UCS code point
2983  *
2984  * Check whether the character is part of Pd UCS Category
2985  *
2986  * Returns 1 if true 0 otherwise
2987  */
2988 int
xmlUCSIsCatPd(int code)2989 xmlUCSIsCatPd(int code) {
2990     return(xmlCharInRange((unsigned int)code, &xmlPdG));
2991 }
2992 
2993 /**
2994  * xmlUCSIsCatPe:
2995  * @code: UCS code point
2996  *
2997  * Check whether the character is part of Pe UCS Category
2998  *
2999  * Returns 1 if true 0 otherwise
3000  */
3001 int
xmlUCSIsCatPe(int code)3002 xmlUCSIsCatPe(int code) {
3003     return(xmlCharInRange((unsigned int)code, &xmlPeG));
3004 }
3005 
3006 /**
3007  * xmlUCSIsCatPf:
3008  * @code: UCS code point
3009  *
3010  * Check whether the character is part of Pf UCS Category
3011  *
3012  * Returns 1 if true 0 otherwise
3013  */
3014 int
xmlUCSIsCatPf(int code)3015 xmlUCSIsCatPf(int code) {
3016     return((code == 0xbb) ||
3017            (code == 0x2019) ||
3018            (code == 0x201d) ||
3019            (code == 0x203a));
3020 }
3021 
3022 /**
3023  * xmlUCSIsCatPi:
3024  * @code: UCS code point
3025  *
3026  * Check whether the character is part of Pi UCS Category
3027  *
3028  * Returns 1 if true 0 otherwise
3029  */
3030 int
xmlUCSIsCatPi(int code)3031 xmlUCSIsCatPi(int code) {
3032     return((code == 0xab) ||
3033            (code == 0x2018) ||
3034            ((code >= 0x201b) && (code <= 0x201c)) ||
3035            (code == 0x201f) ||
3036            (code == 0x2039));
3037 }
3038 
3039 /**
3040  * xmlUCSIsCatPo:
3041  * @code: UCS code point
3042  *
3043  * Check whether the character is part of Po UCS Category
3044  *
3045  * Returns 1 if true 0 otherwise
3046  */
3047 int
xmlUCSIsCatPo(int code)3048 xmlUCSIsCatPo(int code) {
3049     return(xmlCharInRange((unsigned int)code, &xmlPoG));
3050 }
3051 
3052 /**
3053  * xmlUCSIsCatPs:
3054  * @code: UCS code point
3055  *
3056  * Check whether the character is part of Ps UCS Category
3057  *
3058  * Returns 1 if true 0 otherwise
3059  */
3060 int
xmlUCSIsCatPs(int code)3061 xmlUCSIsCatPs(int code) {
3062     return(xmlCharInRange((unsigned int)code, &xmlPsG));
3063 }
3064 
3065 /**
3066  * xmlUCSIsCatS:
3067  * @code: UCS code point
3068  *
3069  * Check whether the character is part of S UCS Category
3070  *
3071  * Returns 1 if true 0 otherwise
3072  */
3073 int
xmlUCSIsCatS(int code)3074 xmlUCSIsCatS(int code) {
3075     return(xmlCharInRange((unsigned int)code, &xmlSG));
3076 }
3077 
3078 /**
3079  * xmlUCSIsCatSc:
3080  * @code: UCS code point
3081  *
3082  * Check whether the character is part of Sc UCS Category
3083  *
3084  * Returns 1 if true 0 otherwise
3085  */
3086 int
xmlUCSIsCatSc(int code)3087 xmlUCSIsCatSc(int code) {
3088     return(xmlCharInRange((unsigned int)code, &xmlScG));
3089 }
3090 
3091 /**
3092  * xmlUCSIsCatSk:
3093  * @code: UCS code point
3094  *
3095  * Check whether the character is part of Sk UCS Category
3096  *
3097  * Returns 1 if true 0 otherwise
3098  */
3099 int
xmlUCSIsCatSk(int code)3100 xmlUCSIsCatSk(int code) {
3101     return(xmlCharInRange((unsigned int)code, &xmlSkG));
3102 }
3103 
3104 /**
3105  * xmlUCSIsCatSm:
3106  * @code: UCS code point
3107  *
3108  * Check whether the character is part of Sm UCS Category
3109  *
3110  * Returns 1 if true 0 otherwise
3111  */
3112 int
xmlUCSIsCatSm(int code)3113 xmlUCSIsCatSm(int code) {
3114     return(xmlCharInRange((unsigned int)code, &xmlSmG));
3115 }
3116 
3117 /**
3118  * xmlUCSIsCatSo:
3119  * @code: UCS code point
3120  *
3121  * Check whether the character is part of So UCS Category
3122  *
3123  * Returns 1 if true 0 otherwise
3124  */
3125 int
xmlUCSIsCatSo(int code)3126 xmlUCSIsCatSo(int code) {
3127     return(xmlCharInRange((unsigned int)code, &xmlSoG));
3128 }
3129 
3130 /**
3131  * xmlUCSIsCatZ:
3132  * @code: UCS code point
3133  *
3134  * Check whether the character is part of Z UCS Category
3135  *
3136  * Returns 1 if true 0 otherwise
3137  */
3138 int
xmlUCSIsCatZ(int code)3139 xmlUCSIsCatZ(int code) {
3140     return(xmlCharInRange((unsigned int)code, &xmlZG));
3141 }
3142 
3143 /**
3144  * xmlUCSIsCatZl:
3145  * @code: UCS code point
3146  *
3147  * Check whether the character is part of Zl UCS Category
3148  *
3149  * Returns 1 if true 0 otherwise
3150  */
3151 int
xmlUCSIsCatZl(int code)3152 xmlUCSIsCatZl(int code) {
3153     return((code == 0x2028));
3154 }
3155 
3156 /**
3157  * xmlUCSIsCatZp:
3158  * @code: UCS code point
3159  *
3160  * Check whether the character is part of Zp UCS Category
3161  *
3162  * Returns 1 if true 0 otherwise
3163  */
3164 int
xmlUCSIsCatZp(int code)3165 xmlUCSIsCatZp(int code) {
3166     return((code == 0x2029));
3167 }
3168 
3169 /**
3170  * xmlUCSIsCatZs:
3171  * @code: UCS code point
3172  *
3173  * Check whether the character is part of Zs UCS Category
3174  *
3175  * Returns 1 if true 0 otherwise
3176  */
3177 int
xmlUCSIsCatZs(int code)3178 xmlUCSIsCatZs(int code) {
3179     return((code == 0x20) ||
3180            (code == 0xa0) ||
3181            (code == 0x1680) ||
3182            (code == 0x180e) ||
3183            ((code >= 0x2000) && (code <= 0x200a)) ||
3184            (code == 0x202f) ||
3185            (code == 0x205f) ||
3186            (code == 0x3000));
3187 }
3188 
3189 /**
3190  * xmlUCSIsCat:
3191  * @code: UCS code point
3192  * @cat: UCS Category name
3193  *
3194  * Check whether the character is part of the UCS Category
3195  *
3196  * Returns 1 if true, 0 if false and -1 on unknown category
3197  */
3198 int
xmlUCSIsCat(int code,const char * cat)3199 xmlUCSIsCat(int code, const char *cat) {
3200     xmlIntFunc *func;
3201 
3202     func = xmlUnicodeLookup(&xmlUnicodeCatTbl, cat);
3203     if (func == NULL)
3204 	return (-1);
3205     return (func(code));
3206 }
3207 
3208 #define bottom_xmlunicode
3209 #include "elfgcchack.h"
3210 #endif /* LIBXML_UNICODE_ENABLED */
3211