-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJclUnicode.pas
More file actions
8195 lines (7487 loc) · 264 KB
/
Copy pathJclUnicode.pas
File metadata and controls
8195 lines (7487 loc) · 264 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{**************************************************************************************************}
{ }
{ Project JEDI Code Library (JCL) }
{ }
{ The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); }
{ you may not use this file except in compliance with the License. You may obtain a copy of the }
{ License at http://www.mozilla.org/MPL/ }
{ }
{ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF }
{ ANY KIND, either express or implied. See the License for the specific language governing rights }
{ and limitations under the License. }
{ }
{ The Original Code is JclUnicode.pas. }
{ }
{ The Initial Developer of the Original Code is Mike Lischke (public att lischke-online dott de). }
{ Portions created by Mike Lischke are Copyright (C) 1999-2000 Mike Lischke. All Rights Reserved. }
{ }
{ Contributor(s): }
{ Marcel van Brakel }
{ Andreas Hausladen (ahuser) }
{ Mike Lischke }
{ Flier Lu (flier) }
{ Robert Marquardt (marquardt) }
{ Robert Rossmair (rrossmair) }
{ Olivier Sannier (obones) }
{ Matthias Thoma (mthoma) }
{ Petr Vones (pvones) }
{ Peter Schraut (http://www.console-dev.de) }
{ Florent Ouchet (outchy) }
{ glchapman }
{ Markus Humm (mhumm) }
{ }
{**************************************************************************************************}
{ }
{ Various Unicode related routines }
{ }
{**************************************************************************************************}
{ }
{ Last modified: $Date:: $ }
{ Revision: $Rev:: $ }
{ Author: $Author:: $ }
{ }
{**************************************************************************************************}
unit JclUnicode;
{$I jcl.inc}
// Copyright (c) 1999-2000 Mike Lischke (public att lischke-online dott de)
//
// 10-JUL-2005: (changes by Peter Schraut)
// - added CodeBlockName, returns the blockname as string
// - added CodeBlockRange, returns the range of the specified codeblock
// - updated TUnicodeBlock to reflect changes in unicode 4.1
// - updated CodeBlockFromChar to reflect changes in unicode 4.1
// - Notes:
// Here are a few suggestions to reflect latest namechanges in unicode 4.1,
// but they were not done due to compatibility with old code:
// ubGreek should be renamed to ubGreekandCoptic
// ubCombiningMarksforSymbols should be renamed to ubCombiningDiacriticalMarksforSymbols
// ubPrivateUse should be renamed to ubPrivateUseArea
//
//
// 19-SEP-2003: (changes by Andreas Hausladen)
// - added OWN_WIDESTRING_MEMMGR for faster memory managment in TWideStringList
// under Windows
// - fixed: TWideStringList.Destroy does not set OnChange and OnChanging to nil before calling Clear
//
//
// 29-MAR-2002: MT
// - WideNormalize now returns strings with normalization mode nfNone unchanged.
// - Bug fix in WideCompose: Raised exception when Result of WideComposeHangul was an
// empty string. (#0000044)
// - Bug fix in WideAdjustLineBreaks
// - Added Asserts were needed.
// - TWideStrings.IndexOfName now takes care of NormalizeForm as well.
// - TWideStrings.IndexOf now takes care of NormalizeForm as well.
// - TWideString.List Find now uses the same NormalizationForm for the search string as it uses
// within the list itself.
//
// 29-NOV-2001:
// - bug fix
// 06-JUN-2001:
// - small changes
// 28-APR-2001:
// - bug fixes
// 05-APR-2001:
// - bug fixes
// 23-MAR-2001:
// - WideSameText
// - small changes
// 10-FEB-2001:
// - bug fix in StringToWideStringEx and WideStringToStringEx
// 05-FEB-2001:
// - TWideStrings.GetSeparatedText changed (no separator anymore after the last line)
// 29-JAN-2001:
// - PrepareUnicodeData
// - LoadInProgress critical section is now created at init time to avoid critical thread races
// - bug fixes
// 26-JAN-2001:
// - ExpandANSIString
// - TWideStrings.SaveUnicode is by default True now
// 20..21-JAN-2001:
// - StrUpperW, StrLowerW and StrTitleW removed because they potentially would need
// a reallocation to work correctly (use the WideString versions instead)
// - further improvements related to internal data
// - introduced TUnicodeBlock
// - CodeBlockFromChar improved
// 07-JAN-2001:
// optimized access to character properties, combining class etc.
// 06-JAN-2001:
// TWideStrings and TWideStringList improved
// APR-DEC 2000: versions 2.1 - 2.6
// - preparation for public rlease
// - additional conversion routines
// - JCL compliance
// - character properties unified
// - character properties data and lookup improvements
// - reworked Unicode data resource file
// - improved simple string comparation routines (StrCompW, StrLCompW etc., include surrogate fix)
// - special case folding data for language neutral case insensitive comparations included
// - optimized decomposition
// - composition and normalization support
// - normalization conformance tests applied
// - bug fixes
// FEB-MAR 2000: version 2.0
// - Unicode regular expressions (URE) search class (TURESearch)
// - generic search engine base class for both the Boyer-Moore and the RE search class
// - whole word only search in UTBM, bug fixes in UTBM
// - string decomposition (including hangul)
// OCT/99 - JAN/2000: version 1.0
// - basic Unicode implementation, more than 100 WideString/UCS2 and UCS4 core functions
// - TWideStrings and TWideStringList classes
// - Unicode Tuned Boyer-Moore search class (TUTBMSearch)
// - low and high level Unicode/Wide* functions
// - low level Unicode UCS4 data import and functions
// - helper functions
//
// Version 2.9
// This unit contains routines and classes to manage and work with Unicode/WideString strings.
// You need Delphi 4 or higher to compile this code.
//
// Publicly available low level functions are all preceded by "Unicode..." (e.g.
// in UnicodeToUpper) while the high level functions use the Str... or Wide...
// naming scheme (e.g. StrLICompW and WideUpperCase).
//
// The normalization implementation in this unit has successfully and completely passed the
// official normative conformance testing as of Annex 9 in Technical Report #15
// (Unicode Standard Annex #15, http://www.unicode.org/unicode/reports/tr15, from 2000-08-31).
//
// Open issues:
// - Yet to do things in the URE class are:
// - check all character classes if they match correctly
// - optimize rebuild of DFA (build only when pattern changes)
// - set flag parameter of ExecuteURE
// - add \d any decimal digit
// \D any character that is not a decimal digit
// \s any whitespace character
// \S any character that is not a whitespace character
// \w any "word" character
// \W any "non-word" character
// - The wide string classes still compare text with functions provided by the
// particular system. This works usually fine under WinNT/W2K (although also
// there are limitations like maximum text lengths). Under Win9x conversions
// from and to MBCS are necessary which are bound to a particular locale and
// so very limited in general use. These comparisons should be changed so that
// the code in this unit is used.
interface
uses
{$IFDEF UNITVERSIONING}
JclUnitVersioning,
{$ENDIF UNITVERSIONING}
{$IFDEF HAS_UNITSCOPE}
{$IFDEF MSWINDOWS}
Winapi.Windows,
{$ENDIF MSWINDOWS}
System.SysUtils, System.Classes,
{$IFDEF HAS_UNIT_CHARACTER}
System.Character,
{$ENDIF HAS_UNIT_CHARACTER}
{$ELSE ~HAS_UNITSCOPE}
{$IFDEF MSWINDOWS}
Windows,
{$ENDIF MSWINDOWS}
SysUtils, Classes,
{$IFDEF HAS_UNIT_CHARACTER}
Character,
{$ENDIF HAS_UNIT_CHARACTER}
{$ENDIF ~HAS_UNITSCOPE}
JclBase;
{$IFNDEF FPC}
{$IFDEF MSWINDOWS}
{$DEFINE OWN_WIDESTRING_MEMMGR}
{$ENDIF MSWINDOWS}
{$ENDIF ~FPC}
const
// definitions of often used characters:
// Note: Use them only for tests of a certain character not to determine character
// classes (like white spaces) as in Unicode are often many code points defined
// being in a certain class. Hence your best option is to use the various
// UnicodeIs* functions.
WideNull = WideChar(#0);
WideTabulator = WideChar(#9);
WideSpace = WideChar(#32);
// logical line breaks
WideLF = WideChar(#10);
WideLineFeed = WideChar(#10);
WideVerticalTab = WideChar(#11);
WideFormFeed = WideChar(#12);
WideCR = WideChar(#13);
WideCarriageReturn = WideChar(#13);
WideCRLF = WideString(#13#10);
WideLineSeparator = WideChar($2028);
WideParagraphSeparator = WideChar($2029);
// byte order marks for Unicode files
// Unicode text files (in UTF-16 format) should contain $FFFE as first character to
// identify such a file clearly. Depending on the system where the file was created
// on this appears either in big endian or little endian style.
BOM_LSB_FIRST = WideChar($FEFF);
BOM_MSB_FIRST = WideChar($FFFE);
type
TSaveFormat = ( sfUTF16LSB, sfUTF16MSB, sfUTF8, sfAnsi );
const
sfUnicodeLSB = sfUTF16LSB;
sfUnicodeMSB = sfUTF16MSB;
type
// various predefined or otherwise useful character property categories
TCharacterCategory = (
// normative categories
ccLetterUppercase,
ccLetterLowercase,
ccLetterTitlecase,
ccMarkNonSpacing,
ccMarkSpacingCombining,
ccMarkEnclosing,
ccNumberDecimalDigit,
ccNumberLetter,
ccNumberOther,
ccSeparatorSpace,
ccSeparatorLine,
ccSeparatorParagraph,
ccOtherControl,
ccOtherFormat,
ccOtherSurrogate,
ccOtherPrivate,
ccOtherUnassigned,
// informative categories
ccLetterModifier,
ccLetterOther,
ccPunctuationConnector,
ccPunctuationDash,
ccPunctuationOpen,
ccPunctuationClose,
ccPunctuationInitialQuote,
ccPunctuationFinalQuote,
ccPunctuationOther,
ccSymbolMath,
ccSymbolCurrency,
ccSymbolModifier,
ccSymbolOther,
// bidirectional categories
ccLeftToRight,
ccLeftToRightEmbedding,
ccLeftToRightOverride,
ccRightToLeft,
ccRightToLeftArabic,
ccRightToLeftEmbedding,
ccRightToLeftOverride,
ccPopDirectionalFormat,
ccEuropeanNumber,
ccEuropeanNumberSeparator,
ccEuropeanNumberTerminator,
ccArabicNumber,
ccCommonNumberSeparator,
ccBoundaryNeutral,
ccSegmentSeparator, // this includes tab and vertical tab
ccWhiteSpace, // Separator characters and control characters which should be treated by programming languages as "white space" for the purpose of parsing elements.
ccOtherNeutrals,
ccLeftToRightIsolate,
ccRightToLeftIsolate,
ccFirstStrongIsolate,
ccPopDirectionalIsolate,
// self defined categories, they do not appear in the Unicode data file
ccComposed, // can be decomposed
ccNonBreaking,
ccSymmetric, // has left and right forms
ccHexDigit, // Characters commonly used for the representation of hexadecimal numbers, plus their compatibility equivalents.
ccQuotationMark, // Punctuation characters that function as quotation marks.
ccMirroring,
ccAssigned, // means there is a definition in the Unicode standard
ccASCIIHexDigit, // ASCII characters commonly used for the representation of hexadecimal numbers
ccBidiControl, // Format control characters which have specific functions in the Unicode Bidirectional Algorithm [UAX9].
ccDash, // Punctuation characters explicitly called out as dashes in the Unicode Standard, plus their compatibility equivalents. Most of these have the General_Category value Pd, but some have the General_Category value Sm because of their use in mathematics.
ccDeprecated, // For a machine-readable list of deprecated characters. No characters will ever be removed from the standard, but the usage of deprecated characters is strongly discouraged.
ccDiacritic, // Characters that linguistically modify the meaning of another character to which they apply. Some diacritics are not combining characters, and some combining characters are not diacritics.
ccExtender, // Characters whose principal function is to extend the value or shape of a preceding alphabetic character. Typical of these are length and iteration marks.
ccHyphen, // Dashes which are used to mark connections between pieces of words, plus the Katakana middle dot. The Katakana middle dot functions like a hyphen, but is shaped like a dot rather than a dash.
ccIdeographic, // Characters considered to be CJKV (Chinese, Japanese, Korean, and Vietnamese) ideographs.
ccIDSBinaryOperator, // Used in Ideographic Description Sequences.
ccIDSTrinaryOperator, // Used in Ideographic Description Sequences.
ccJoinControl, // Format control characters which have specific functions for control of cursive joining and ligation.
ccLogicalOrderException, // There are a small number of characters that do not use logical order. These characters require special handling in most processing.
ccNonCharacterCodePoint, // Code points permanently reserved for internal use.
ccOtherAlphabetic, // Used in deriving the Alphabetic property.
ccOtherDefaultIgnorableCodePoint, // Used in deriving the Default_Ignorable_Code_Point property.
ccOtherGraphemeExtend, // Used in deriving the Grapheme_Extend property.
ccOtherIDContinue, // Used for backward compatibility of ID_Continue.
ccOtherIDStart, // Used for backward compatibility of ID_Start.
ccOtherLowercase, // Used in deriving the Lowercase property.
ccOtherMath, // Used in deriving the Math property.
ccOtherUppercase, // Used in deriving the Uppercase property.
ccPatternSyntax, // Used for pattern syntax as described in UAX #31: Unicode Identifier and Pattern Syntax [UAX31].
ccPatternWhiteSpace,
ccRadical, // Used in Ideographic Description Sequences.
ccSoftDotted, // Characters with a "soft dot", like i or j. An accent placed on these characters causes the dot to disappear. An explicit dot above can be added where required, such as in Lithuanian.
ccSTerm, // Sentence Terminal. Used in UAX #29: Unicode Text Segmentation [UAX29].
ccTerminalPunctuation, // Punctuation characters that generally mark the end of textual units.
ccUnifiedIdeograph, // Used in Ideographic Description Sequences.
ccVariationSelector, // Indicates characters that are Variation Selectors. For details on the behavior of these characters, see StandardizedVariants.html, Section 16.4, "Variation Selectors" in [Unicode], and the Unicode Ideographic Variation Database [UTS37].
ccSentenceTerminal, // Characters used at the end of a sentence
ccPrependedQuotationMark,
ccRegionalIndicator
);
TCharacterCategories = set of TCharacterCategory;
{$IFDEF HAS_UNIT_CHARACTER}
type
TCharacterUnicodeCategory = ccLetterUppercase..ccSymbolOther;
const
CharacterCategoryToUnicodeCategory: array [TCharacterUnicodeCategory] of TUnicodeCategory =
( TUnicodeCategory.ucUppercaseLetter, // ccLetterUppercase
TUnicodeCategory.ucLowercaseLetter, // ccLetterLowercase
TUnicodeCategory.ucTitlecaseLetter, // ccLetterTitlecase
TUnicodeCategory.ucNonSpacingMark, // ccMarkNonSpacing
TUnicodeCategory.ucCombiningMark, // ccMarkSpacingCombining
TUnicodeCategory.ucEnclosingMark, // ccMarkEnclosing
TUnicodeCategory.ucDecimalNumber, // ccNumberDecimalDigit
TUnicodeCategory.ucLetterNumber, // ccNumberLetter
TUnicodeCategory.ucOtherNumber, // ccNumberOther
TUnicodeCategory.ucSpaceSeparator, // ccSeparatorSpace
TUnicodeCategory.ucLineSeparator, // ccSeparatorLine
TUnicodeCategory.ucParagraphSeparator, // ccSeparatorParagraph
TUnicodeCategory.ucControl, // ccOtherControl
TUnicodeCategory.ucFormat, // ccOtherFormat
TUnicodeCategory.ucSurrogate, // ccOtherSurrogate
TUnicodeCategory.ucPrivateUse, // ccOtherPrivate
TUnicodeCategory.ucUnassigned, // ccOtherUnassigned
TUnicodeCategory.ucModifierLetter, // ccLetterModifier
TUnicodeCategory.ucOtherLetter, // ccLetterOther
TUnicodeCategory.ucConnectPunctuation, // ccPunctuationConnector
TUnicodeCategory.ucDashPunctuation, // ccPunctuationDash
TUnicodeCategory.ucOpenPunctuation, // ccPunctuationOpen
TUnicodeCategory.ucClosePunctuation, // ccPunctuationClose
TUnicodeCategory.ucInitialPunctuation, // ccPunctuationInitialQuote
TUnicodeCategory.ucFinalPunctuation, // ccPunctuationFinalQuote
TUnicodeCategory.ucOtherPunctuation, // ccPunctuationOther
TUnicodeCategory.ucMathSymbol, // ccSymbolMath
TUnicodeCategory.ucCurrencySymbol, // ccSymbolCurrency
TUnicodeCategory.ucModifierSymbol, // ccSymbolModifier
TUnicodeCategory.ucOtherSymbol ); // ccSymbolOther
UnicodeCategoryToCharacterCategory: array [TUnicodeCategory] of TCharacterCategory =
( ccOtherControl, // ucControl
ccOtherFormat, // ucFormat
ccOtherUnassigned, // ucUnassigned
ccOtherPrivate, // ucPrivateUse
ccOtherSurrogate, // ucSurrogate
ccLetterLowercase, // ucLowercaseLetter
ccLetterModifier, // ucModifierLetter
ccLetterOther, // ucOtherLetter
ccLetterTitlecase, // ucTitlecaseLetter
ccLetterUppercase, // ucUppercaseLetter
ccMarkSpacingCombining, // ucCombiningMark
ccMarkEnclosing, // ucEnclosingMark
ccMarkNonSpacing, // ucNonSpacingMark
ccNumberDecimalDigit, // ucDecimalNumber
ccNumberLetter, // ucLetterNumber
ccNumberOther, // ucOtherNumber
ccPunctuationConnector, // ucConnectPunctuation
ccPunctuationDash, // ucDashPunctuation
ccPunctuationClose, // ucClosePunctuation
ccPunctuationFinalQuote, // ucFinalPunctuation
ccPunctuationInitialQuote, // ucInitialPunctuation
ccPunctuationOther, // ucOtherPunctuation
ccPunctuationOpen, // ucOpenPunctuation
ccSymbolCurrency, // ucCurrencySymbol
ccSymbolModifier, // ucModifierSymbol
ccSymbolMath, // ucMathSymbol
ccSymbolOther, // ucOtherSymbol
ccSeparatorLine, // ucLineSeparator
ccSeparatorParagraph, // ucParagraphSeparator
ccSeparatorSpace ); // ucSpaceSeparator
function CharacterCategoriesToUnicodeCategory(const Categories: TCharacterCategories): TUnicodeCategory;
function UnicodeCategoryToCharacterCategories(Category: TUnicodeCategory): TCharacterCategories;
{$ENDIF HAS_UNIT_CHARACTER}
type
// four forms of normalization are defined:
TNormalizationForm = (
nfNone, // do not normalize
nfC, // canonical decomposition followed by canonical composition (this is most often used)
nfD, // canonical decomposition
nfKC, // compatibility decomposition followed by a canonical composition
nfKD // compatibility decomposition
);
// 16 compatibility formatting tags are defined:
TCompatibilityFormattingTag = (
cftCanonical, // default when no CFT is explicited
cftFont, // Font variant (for example, a blackletter form)
cftNoBreak, // No-break version of a space or hyphen
cftInitial, // Initial presentation form (Arabic)
cftMedial, // Medial presentation form (Arabic)
cftFinal, // Final presentation form (Arabic)
cftIsolated, // Isolated presentation form (Arabic)
cftCircle, // Encircled form
cftSuper, // Superscript form
cftSub, // Subscript form
cftVertical, // Vertical layout presentation form
cftWide, // Wide (or zenkaku) compatibility character
cftNarrow, // Narrow (or hankaku) compatibility character
cftSmall, // Small variant form (CNS compatibility)
cftSquare, // CJK squared font variant
cftFraction, // Vulgar fraction form
cftCompat // Otherwise unspecified compatibility character
);
TCompatibilityFormattingTags = set of TCompatibilityFormattingTag;
// used to hold information about the start and end
// position of a unicodeblock.
TUnicodeBlockRange = record
RangeStart,
RangeEnd: Cardinal;
end;
// An Unicode block usually corresponds to a particular language script but
// can also represent special characters, musical symbols and the like.
// https://www.unicode.org/charts/
TUnicodeBlock = (
ubUndefined,
ubBasicLatin,
ubLatin1Supplement,
ubLatinExtendedA,
ubLatinExtendedB,
ubIPAExtensions,
ubSpacingModifierLetters,
ubCombiningDiacriticalMarks,
ubGreekandCoptic,
ubCyrillic,
ubCyrillicSupplement,
ubArmenian,
ubHebrew,
ubArabic,
ubSyriac,
ubArabicSupplement,
ubThaana,
ubNKo,
ubSamaritan,
ubMandaic,
ubSyriacSupplement,
ubArabicExtendedA,
ubDevanagari,
ubBengali,
ubGurmukhi,
ubGujarati,
ubOriya,
ubTamil,
ubTelugu,
ubKannada,
ubMalayalam,
ubSinhala,
ubThai,
ubLao,
ubTibetan,
ubMyanmar,
ubGeorgian,
ubHangulJamo,
ubEthiopic,
ubEthiopicSupplement,
ubCherokee,
ubUnifiedCanadianAboriginalSyllabics,
ubOgham,
ubRunic,
ubTagalog,
ubHanunoo,
ubBuhid,
ubTagbanwa,
ubKhmer,
ubMongolian,
ubUnifiedCanadianAboriginalSyllabicsExtended,
ubLimbu,
ubTaiLe,
ubNewTaiLue,
ubKhmerSymbols,
ubBuginese,
ubTaiTham,
ubCombiningDiactiticalMarksExtended,
ubBalinese,
ubSundanese,
ubBatak,
ubLepcha,
ubOlChiki,
ubCyrillicExtendedC,
ubGeorgianExtended,
ubSundaneseSupplement,
ubVedicExtensions,
ubPhoneticExtensions,
ubPhoneticExtensionsSupplement,
ubCombiningDiacriticalMarksSupplement,
ubLatinExtendedAdditional,
ubGreekExtended,
ubGeneralPunctuation,
ubSuperscriptsandSubscripts,
ubCurrencySymbols,
ubCombiningDiacriticalMarksforSymbols,
ubLetterlikeSymbols,
ubNumberForms,
ubArrows,
ubMathematicalOperators,
ubMiscellaneousTechnical,
ubControlPictures,
ubOpticalCharacterRecognition,
ubEnclosedAlphanumerics,
ubBoxDrawing,
ubBlockElements,
ubGeometricShapes,
ubMiscellaneousSymbols,
ubDingbats,
ubMiscellaneousMathematicalSymbolsA,
ubSupplementalArrowsA,
ubBraillePatterns,
ubSupplementalArrowsB,
ubMiscellaneousMathematicalSymbolsB,
ubSupplementalMathematicalOperators,
ubMiscellaneousSymbolsandArrows,
ubGlagolitic,
ubLatinExtendedC,
ubCoptic,
ubGeorgianSupplement,
ubTifinagh,
ubEthiopicExtended,
ubCyrillicExtendedA,
ubSupplementalPunctuation,
ubCJKRadicalsSupplement,
ubKangxiRadicals,
ubIdeographicDescriptionCharacters,
ubCJKSymbolsandPunctuation,
ubHiragana,
ubKatakana,
ubBopomofo,
ubHangulCompatibilityJamo,
ubKanbun,
ubBopomofoExtended,
ubCJKStrokes,
ubKatakanaPhoneticExtensions,
ubEnclosedCJKLettersandMonths,
ubCJKCompatibility,
ubCJKUnifiedIdeographsExtensionA,
ubYijingHexagramSymbols,
ubCJKUnifiedIdeographs,
ubYiSyllables,
ubYiRadicals,
ubLisu,
ubVai,
ubCyrillicExtendedB,
ubBamum,
ubModifierToneLetters,
ubLatinExtendedD,
ubSylotiNagri,
ubCommonIndicNumberForms,
ubPhagsPa,
ubSaurashtra,
ubDevanagariExtended,
ubKayahLi,
ubRejang,
ubHangulJamoExtendedA,
ubJavanese,
ubMyanmarExtendedB,
ubCham,
ubMyanmarExtendedA,
ubTaiViet,
ubMeeteiMayekExtensions,
ubEthiopicExtendedA,
ubLatinExtendedE,
ubCherokeeSupplement,
ubMeeteiMayek,
ubHangulSyllables,
ubHangulJamoExtendedB,
ubHighSurrogates,
ubHighPrivateUseSurrogates,
ubLowSurrogates,
ubPrivateUseArea,
ubCJKCompatibilityIdeographs,
ubAlphabeticPresentationForms,
ubArabicPresentationFormsA,
ubVariationSelectors,
ubVerticalForms,
ubCombiningHalfMarks,
ubCJKCompatibilityForms,
ubSmallFormVariants,
ubArabicPresentationFormsB,
ubHalfwidthandFullwidthForms,
ubSpecials,
ubLinearBSyllabary,
ubLinearBIdeograms,
ubAegeanNumbers,
ubAncientGreekNumbers,
ubAncientSymbols,
ubPhaistosDisc,
ubLycian,
ubCarian,
ubCopticEpactNumbers,
ubOldItalic,
ubGothic,
ubOldPermic,
ubUgaritic,
ubOldPersian,
ubDeseret,
ubShavian,
ubOsmanya,
ubOsage,
ubElbasan,
ubCaucasianAlbanian,
ubLinearA,
ubCypriotSyllabary,
ubImperialAramaic,
ubPalmyrene,
ubNabataean,
ubHatran,
ubPhoenician,
ubLydian,
ubMeroiticHieroglyphs,
ubMeroiticCursive,
ubKharoshthi,
ubOldSouthArabian,
ubOldNorthArabian,
ubManichaean,
ubAvestan,
ubInscriptionalParthian,
ubInscriptionalPahlavi,
ubPsalterPahlavi,
ubOldTurkic,
ubOldHungarian,
ubHanifiRohingya,
ubRumiNumeralSymbols,
ubYezidi,
ubOldSogdian,
ubSogdian,
ubChorasmian,
ubElymaic,
ubBrahmi,
ubKaithi,
ubSoraSompeng,
ubChakma,
ubMahajani,
ubSharada,
ubSinhalaArchaicNumbers,
ubKhojki,
ubMultani,
ubKhudawadi,
ubGrantha,
ubNewa,
ubTirhuta,
ubSiddam,
ubModi,
ubMongolianSupplement,
ubTakri,
ubAhom,
ubDogra,
ubWarangCiti,
ubDivesAkuru,
ubNandinagari,
ubZanabazarSquare,
ubSoyombo,
ubPauCinHau,
ubBhaiksuki,
ubMarchen,
ubMasaramGondi,
ubGunjalaGondi,
ubTamilSupplement,
ubMakasar,
ubLisuSupplement,
ubCuneiform,
ubCuneiformNumbersAndPunctuation,
ubEarlyDynasticCuneiform,
ubEgyptianHieroglyphs,
ubEgyptianHieroglyphFormatControls,
ubAnatolianHieroglyphs,
ubBamumSupplement,
ubMro,
ubBassaVah,
ubPahawhHmong,
ubMedefaidrin,
ubMiao,
upIdeographicSymbolsAndPunctuation,
ubTangut,
ubTangutComponents,
ubKhitanSmallScript,
ubTangutSupplement,
ubKanaSupplement,
ubKanaExtendedA,
ubSmallKanaExtension,
ubNushu,
ubDuployan,
ubShorthandFormatControls,
ubByzantineMusicalSymbols,
ubMusicalSymbols,
ubAncientGreekMusicalNotation,
ubMayanNumerals,
ubTaiXuanJingSymbols,
ubCountingRodNumerals,
ubSuttonSignWriting,
ubMathematicalAlphanumericSymbols,
ubGlagolithicSupplement,
ubWancho,
ubNyiakengPuachueHmong,
ubMendeKikakui,
ubIndicSiyaqNumbers,
ubOttomanSiyaqNumbers,
ubAdlam,
ubArabicMathematicalAlphabeticSymbols,
ubMahjongTiles,
ubDominoTiles,
ubPlayingCards,
ubEnclosedAlphanumericSupplement,
ubEnclosedIdeographicSupplement,
ubMiscellaneousSymbolsAndPictographs,
ubEmoticons,
ubOrnamentalDingbats,
ubTransportAndMapSymbols,
ubAlchemicalSymbols,
ubGeometricShapesExtended,
ubSupplementalArrowsC,
ubSupplementalSymbolsAndPictographs,
ubChessSymbols,
ubSymbolsAndPictographsExtendedA,
ubSymbolsForLegacyComputing,
ubCJKUnifiedIdeographsExtensionB,
ubCJKUnifiedIdeographsExtensionC,
ubCJKUnifiedIdeographsExtensionD,
ubCJKUnifiedIdeographsExtensionE,
ubCJKUnifiedIdeographsExtensionF,
ubCJKCompatibilityIdeographsSupplement,
ubCJKUnifiedIdeographsExtensionG,
ubTags,
ubVariationSelectorsSupplement,
ubSupplementaryPrivateUseAreaA,
ubSupplementaryPrivateUseAreaB
);
TUnicodeBlockData = record
Range: TUnicodeBlockRange;
Name: string;
end;
PUnicodeBlockData = ^TUnicodeBlockData;
const
UnicodeBlockData: array [TUnicodeBlock] of TUnicodeBlockData =
((Range:(RangeStart: $FFFFFFFF; RangeEnd: $0000); Name: 'No-block'),
(Range:(RangeStart: $0000; RangeEnd: $007F); Name: 'Basic Latin'),
(Range:(RangeStart: $0080; RangeEnd: $00FF); Name: 'Latin-1 Supplement'),
(Range:(RangeStart: $0100; RangeEnd: $017F); Name: 'Latin Extended-A'),
(Range:(RangeStart: $0180; RangeEnd: $024F); Name: 'Latin Extended-B'),
(Range:(RangeStart: $0250; RangeEnd: $02AF); Name: 'IPA Extensions'),
(Range:(RangeStart: $02B0; RangeEnd: $02FF); Name: 'Spacing Modifier Letters'),
(Range:(RangeStart: $0300; RangeEnd: $036F); Name: 'Combining Diacritical Marks'),
(Range:(RangeStart: $0370; RangeEnd: $03FF); Name: 'Greek and Coptic'),
(Range:(RangeStart: $0400; RangeEnd: $04FF); Name: 'Cyrillic'),
(Range:(RangeStart: $0500; RangeEnd: $052F); Name: 'Cyrillic Supplement'),
(Range:(RangeStart: $0530; RangeEnd: $058F); Name: 'Armenian'),
(Range:(RangeStart: $0590; RangeEnd: $05FF); Name: 'Hebrew'),
(Range:(RangeStart: $0600; RangeEnd: $06FF); Name: 'Arabic'),
(Range:(RangeStart: $0700; RangeEnd: $074F); Name: 'Syriac'),
(Range:(RangeStart: $0750; RangeEnd: $077F); Name: 'Arabic Supplement'),
(Range:(RangeStart: $0780; RangeEnd: $07BF); Name: 'Thaana'),
(Range:(RangeStart: $07C0; RangeEnd: $07FF); Name: 'NKo'),
(Range:(RangeStart: $0800; RangeEnd: $083F); Name: 'Samaritan'),
(Range:(RangeStart: $0840; RangeEnd: $085F); Name: 'Mandaic'),
(Range:(RangeStart: $0860; RangeEnd: $086F); Name: 'Syriac Supplement'),
(Range:(RangeStart: $08A0; RangeEnd: $08FF); Name: 'Arabic Extended-A'),
(Range:(RangeStart: $0900; RangeEnd: $097F); Name: 'Devanagari'),
(Range:(RangeStart: $0980; RangeEnd: $09FF); Name: 'Bengali'),
(Range:(RangeStart: $0A00; RangeEnd: $0A7F); Name: 'Gurmukhi'),
(Range:(RangeStart: $0A80; RangeEnd: $0AFF); Name: 'Gujarati'),
(Range:(RangeStart: $0B00; RangeEnd: $0B7F); Name: 'Oriya'),
(Range:(RangeStart: $0B80; RangeEnd: $0BFF); Name: 'Tamil'),
(Range:(RangeStart: $0C00; RangeEnd: $0C7F); Name: 'Telugu'),
(Range:(RangeStart: $0C80; RangeEnd: $0CFF); Name: 'Kannada'),
(Range:(RangeStart: $0D00; RangeEnd: $0D7F); Name: 'Malayalam'),
(Range:(RangeStart: $0D80; RangeEnd: $0DFF); Name: 'Sinhala'),
(Range:(RangeStart: $0E00; RangeEnd: $0E7F); Name: 'Thai'),
(Range:(RangeStart: $0E80; RangeEnd: $0EFF); Name: 'Lao'),
(Range:(RangeStart: $0F00; RangeEnd: $0FFF); Name: 'Tibetan'),
(Range:(RangeStart: $1000; RangeEnd: $109F); Name: 'Myanmar'),
(Range:(RangeStart: $10A0; RangeEnd: $10FF); Name: 'Georgian'),
(Range:(RangeStart: $1100; RangeEnd: $11FF); Name: 'Hangul Jamo'),
(Range:(RangeStart: $1200; RangeEnd: $137F); Name: 'Ethiopic'),
(Range:(RangeStart: $1380; RangeEnd: $139F); Name: 'Ethiopic Supplement'),
(Range:(RangeStart: $13A0; RangeEnd: $13FF); Name: 'Cherokee'),
(Range:(RangeStart: $1400; RangeEnd: $167F); Name: 'Unified Canadian Aboriginal Syllabics'),
(Range:(RangeStart: $1680; RangeEnd: $169F); Name: 'Ogham'),
(Range:(RangeStart: $16A0; RangeEnd: $16FF); Name: 'Runic'),
(Range:(RangeStart: $1700; RangeEnd: $171F); Name: 'Tagalog'),
(Range:(RangeStart: $1720; RangeEnd: $173F); Name: 'Hanunoo'),
(Range:(RangeStart: $1740; RangeEnd: $175F); Name: 'Buhid'),
(Range:(RangeStart: $1760; RangeEnd: $177F); Name: 'Tagbanwa'),
(Range:(RangeStart: $1780; RangeEnd: $17FF); Name: 'Khmer'),
(Range:(RangeStart: $1800; RangeEnd: $18AF); Name: 'Mongolian'),
(Range:(RangeStart: $18B0; RangeEnd: $18FF); Name: 'Unified Canadian Aboriginal Syllabics Extended'),
(Range:(RangeStart: $1900; RangeEnd: $194F); Name: 'Limbu'),
(Range:(RangeStart: $1950; RangeEnd: $197F); Name: 'Tai Le'),
(Range:(RangeStart: $1980; RangeEnd: $19DF); Name: 'New Tai Lue'),
(Range:(RangeStart: $19E0; RangeEnd: $19FF); Name: 'Khmer Symbols'),
(Range:(RangeStart: $1A00; RangeEnd: $1A1F); Name: 'Buginese'),
(Range:(RangeStart: $1A20; RangeEnd: $1AAF); Name: 'Tai Tham'),
(Range:(RangeStart: $1AB0; RangeEnd: $1AFF); Name: 'Combining Diacritical Marks Extended'),
(Range:(RangeStart: $1B00; RangeEnd: $1B7F); Name: 'Balinese'),
(Range:(RangeStart: $1B80; RangeEnd: $1BBF); Name: 'Sundanese'),
(Range:(RangeStart: $1BC0; RangeEnd: $1BFF); Name: 'Batak'),
(Range:(RangeStart: $1C00; RangeEnd: $1C4F); Name: 'Lepcha'),
(Range:(RangeStart: $1C50; RangeEnd: $1C7F); Name: 'Ol Chiki'),
(Range:(RangeStart: $1C80; RangeEnd: $1C8F); Name: 'Cyrillic Extended-C'),
(Range:(RangeStart: $1C90; RangeEnd: $1CBF); Name: 'Georgian Extended'),
(Range:(RangeStart: $1CC0; RangeEnd: $1CCF); Name: 'Sundanese Supplement'),
(Range:(RangeStart: $1CD0; RangeEnd: $1CFF); Name: 'Vedic Extensions'),
(Range:(RangeStart: $1D00; RangeEnd: $1D7F); Name: 'Phonetic Extensions'),
(Range:(RangeStart: $1D80; RangeEnd: $1DBF); Name: 'Phonetic Extensions Supplement'),
(Range:(RangeStart: $1DC0; RangeEnd: $1DFF); Name: 'Combining Diacritical Marks Supplement'),
(Range:(RangeStart: $1E00; RangeEnd: $1EFF); Name: 'Latin Extended Additional'),
(Range:(RangeStart: $1F00; RangeEnd: $1FFF); Name: 'Greek Extended'),
(Range:(RangeStart: $2000; RangeEnd: $206F); Name: 'General Punctuation'),
(Range:(RangeStart: $2070; RangeEnd: $209F); Name: 'Superscripts and Subscripts'),
(Range:(RangeStart: $20A0; RangeEnd: $20CF); Name: 'Currency Symbols'),
(Range:(RangeStart: $20D0; RangeEnd: $20FF); Name: 'Combining Diacritical Marks for Symbols'),
(Range:(RangeStart: $2100; RangeEnd: $214F); Name: 'Letterlike Symbols'),
(Range:(RangeStart: $2150; RangeEnd: $218F); Name: 'Number Forms'),
(Range:(RangeStart: $2190; RangeEnd: $21FF); Name: 'Arrows'),
(Range:(RangeStart: $2200; RangeEnd: $22FF); Name: 'Mathematical Operators'),
(Range:(RangeStart: $2300; RangeEnd: $23FF); Name: 'Miscellaneous Technical'),
(Range:(RangeStart: $2400; RangeEnd: $243F); Name: 'Control Pictures'),
(Range:(RangeStart: $2440; RangeEnd: $245F); Name: 'Optical Character Recognition'),
(Range:(RangeStart: $2460; RangeEnd: $24FF); Name: 'Enclosed Alphanumerics'),
(Range:(RangeStart: $2500; RangeEnd: $257F); Name: 'Box Drawing'),
(Range:(RangeStart: $2580; RangeEnd: $259F); Name: 'Block Elements'),
(Range:(RangeStart: $25A0; RangeEnd: $25FF); Name: 'Geometric Shapes'),
(Range:(RangeStart: $2600; RangeEnd: $26FF); Name: 'Miscellaneous Symbols'),
(Range:(RangeStart: $2700; RangeEnd: $27BF); Name: 'Dingbats'),
(Range:(RangeStart: $27C0; RangeEnd: $27EF); Name: 'Miscellaneous Mathematical Symbols-A'),
(Range:(RangeStart: $27F0; RangeEnd: $27FF); Name: 'Supplemental Arrows-A'),
(Range:(RangeStart: $2800; RangeEnd: $28FF); Name: 'Braille Patterns'),
(Range:(RangeStart: $2900; RangeEnd: $297F); Name: 'Supplemental Arrows-B'),
(Range:(RangeStart: $2980; RangeEnd: $29FF); Name: 'Miscellaneous Mathematical Symbols-B'),
(Range:(RangeStart: $2A00; RangeEnd: $2AFF); Name: 'Supplemental Mathematical Operators'),
(Range:(RangeStart: $2B00; RangeEnd: $2BFF); Name: 'Miscellaneous Symbols and Arrows'),
(Range:(RangeStart: $2C00; RangeEnd: $2C5F); Name: 'Glagolitic'),
(Range:(RangeStart: $2C60; RangeEnd: $2C7F); Name: 'Latin Extended-C'),
(Range:(RangeStart: $2C80; RangeEnd: $2CFF); Name: 'Coptic'),
(Range:(RangeStart: $2D00; RangeEnd: $2D2F); Name: 'Georgian Supplement'),
(Range:(RangeStart: $2D30; RangeEnd: $2D7F); Name: 'Tifinagh'),
(Range:(RangeStart: $2D80; RangeEnd: $2DDF); Name: 'Ethiopic Extended'),
(Range:(RangeStart: $2DE0; RangeEnd: $2DFF); Name: 'Cyrillic Extended-A'),
(Range:(RangeStart: $2E00; RangeEnd: $2E7F); Name: 'Supplemental Punctuation'),
(Range:(RangeStart: $2E80; RangeEnd: $2EFF); Name: 'CJK Radicals Supplement'),
(Range:(RangeStart: $2F00; RangeEnd: $2FDF); Name: 'Kangxi Radicals'),
(Range:(RangeStart: $2FF0; RangeEnd: $2FFF); Name: 'Ideographic Description Characters'),
(Range:(RangeStart: $3000; RangeEnd: $303F); Name: 'CJK Symbols and Punctuation'),
(Range:(RangeStart: $3040; RangeEnd: $309F); Name: 'Hiragana'),
(Range:(RangeStart: $30A0; RangeEnd: $30FF); Name: 'Katakana'),
(Range:(RangeStart: $3100; RangeEnd: $312F); Name: 'Bopomofo'),
(Range:(RangeStart: $3130; RangeEnd: $318F); Name: 'Hangul Compatibility Jamo'),
(Range:(RangeStart: $3190; RangeEnd: $319F); Name: 'Kanbun'),
(Range:(RangeStart: $31A0; RangeEnd: $31BF); Name: 'Bopomofo Extended'),
(Range:(RangeStart: $31C0; RangeEnd: $31EF); Name: 'CJK Strokes'),
(Range:(RangeStart: $31F0; RangeEnd: $31FF); Name: 'Katakana Phonetic Extensions'),
(Range:(RangeStart: $3200; RangeEnd: $32FF); Name: 'Enclosed CJK Letters and Months'),
(Range:(RangeStart: $3300; RangeEnd: $33FF); Name: 'CJK Compatibility'),
(Range:(RangeStart: $3400; RangeEnd: $4DBF); Name: 'CJK Unified Ideographs Extension A'),
(Range:(RangeStart: $4DC0; RangeEnd: $4DFF); Name: 'Yijing Hexagram Symbols'),
(Range:(RangeStart: $4E00; RangeEnd: $9FFC); Name: 'CJK Unified Ideographs'),
(Range:(RangeStart: $A000; RangeEnd: $A48F); Name: 'Yi Syllables'),
(Range:(RangeStart: $A490; RangeEnd: $A4CF); Name: 'Yi Radicals'),
(Range:(RangeStart: $A4D0; RangeEnd: $A4FF); Name: 'Lisu'),
(Range:(RangeStart: $A500; RangeEnd: $A63F); Name: 'Vai'),
(Range:(RangeStart: $A640; RangeEnd: $A69F); Name: 'Cyrillic Extended-B'),
(Range:(RangeStart: $A6A0; RangeEnd: $A6FF); Name: 'Bamum'),
(Range:(RangeStart: $A700; RangeEnd: $A71F); Name: 'Modifier Tone Letters'),
(Range:(RangeStart: $A720; RangeEnd: $A7FF); Name: 'Latin Extended-D'),
(Range:(RangeStart: $A800; RangeEnd: $A82F); Name: 'Syloti Nagri'),
(Range:(RangeStart: $A830; RangeEnd: $A83F); Name: 'Common Indic Number Forms'),
(Range:(RangeStart: $A840; RangeEnd: $A87F); Name: 'Phags-pa'),
(Range:(RangeStart: $A880; RangeEnd: $A8DF); Name: 'Saurashtra'),
(Range:(RangeStart: $A8E0; RangeEnd: $A8FF); Name: 'Devanagari Extended'),
(Range:(RangeStart: $A900; RangeEnd: $A92F); Name: 'Kayah Li'),
(Range:(RangeStart: $A930; RangeEnd: $A95F); Name: 'Rejang'),
(Range:(RangeStart: $A960; RangeEnd: $A97F); Name: 'Hangul Jamo Extended-A'),
(Range:(RangeStart: $A980; RangeEnd: $A9DF); Name: 'Javanese'),
(Range:(RangeStart: $A9E0; RangeEnd: $A9FF); Name: 'Myanmar Extended-B'),
(Range:(RangeStart: $AA00; RangeEnd: $AA5F); Name: 'Cham'),
(Range:(RangeStart: $AA60; RangeEnd: $AA7F); Name: 'Myanmar Extended-A'),
(Range:(RangeStart: $AA80; RangeEnd: $AADF); Name: 'Tai Viet'),
(Range:(RangeStart: $AAE0; RangeEnd: $AAFF); Name: 'Meetei Mayek Extensions'),
(Range:(RangeStart: $AB00; RangeEnd: $AB2F); Name: 'Ethiopic Extended-A'),
(Range:(RangeStart: $AB30; RangeEnd: $AB6F); Name: 'Latin Extended-E'),
(Range:(RangeStart: $AB70; RangeEnd: $ABBF); Name: 'Cherokee Supplement'),
(Range:(RangeStart: $ABC0; RangeEnd: $ABFF); Name: 'Meetei Mayek'),
(Range:(RangeStart: $AC00; RangeEnd: $D7AF); Name: 'Hangul Syllables'),
(Range:(RangeStart: $D7B0; RangeEnd: $D7FF); Name: 'Hangul Jamo Extended-B'),
(Range:(RangeStart: $D800; RangeEnd: $DB7F); Name: 'High Surrogates'),
(Range:(RangeStart: $DB80; RangeEnd: $DBFF); Name: 'High Private Use Surrogates'),
(Range:(RangeStart: $DC00; RangeEnd: $DFFF); Name: 'Low Surrogates'),
(Range:(RangeStart: $E000; RangeEnd: $F8FF); Name: 'Private Use Area'),
(Range:(RangeStart: $F900; RangeEnd: $FAFF); Name: 'CJK Compatibility Ideographs'),
(Range:(RangeStart: $FB00; RangeEnd: $FB4F); Name: 'Alphabetic Presentation Forms'),
(Range:(RangeStart: $FB50; RangeEnd: $FDFF); Name: 'Arabic Presentation Forms-A'),
(Range:(RangeStart: $FE00; RangeEnd: $FE0F); Name: 'Variation Selectors'),
(Range:(RangeStart: $FE10; RangeEnd: $FE1F); Name: 'Vertical Forms'),
(Range:(RangeStart: $FE20; RangeEnd: $FE2F); Name: 'Combining Half Marks'),
(Range:(RangeStart: $FE30; RangeEnd: $FE4F); Name: 'CJK Compatibility Forms'),
(Range:(RangeStart: $FE50; RangeEnd: $FE6F); Name: 'Small Form Variants'),
(Range:(RangeStart: $FE70; RangeEnd: $FEFF); Name: 'Arabic Presentation Forms-B'),
(Range:(RangeStart: $FF00; RangeEnd: $FFEF); Name: 'Halfwidth and Fullwidth Forms'),
(Range:(RangeStart: $FFF0; RangeEnd: $FFFF); Name: 'Specials'),
(Range:(RangeStart: $10000; RangeEnd: $1007F); Name: 'Linear B Syllabary'),
(Range:(RangeStart: $10080; RangeEnd: $100FF); Name: 'Linear B Ideograms'),
(Range:(RangeStart: $10100; RangeEnd: $1013F); Name: 'Aegean Numbers'),
(Range:(RangeStart: $10140; RangeEnd: $1018F); Name: 'Ancient Greek Numbers'),
(Range:(RangeStart: $10190; RangeEnd: $101CF); Name: 'Ancient Symbols'),
(Range:(RangeStart: $101D0; RangeEnd: $101FF); Name: 'Phaistos Disc'),
(Range:(RangeStart: $10280; RangeEnd: $1029F); Name: 'Lycian'),
(Range:(RangeStart: $102A0; RangeEnd: $102DF); Name: 'Carian'),
(Range:(RangeStart: $102E0; RangeEnd: $102FF); Name: 'Coptic Epact Numbers'),
(Range:(RangeStart: $10300; RangeEnd: $1032F); Name: 'Old Italic'),
(Range:(RangeStart: $10330; RangeEnd: $1034F); Name: 'Gothic'),
(Range:(RangeStart: $10350; RangeEnd: $1037F); Name: 'Old Permic'),
(Range:(RangeStart: $10380; RangeEnd: $1039F); Name: 'Ugaritic'),
(Range:(RangeStart: $103A0; RangeEnd: $103DF); Name: 'Old Persian'),
(Range:(RangeStart: $10400; RangeEnd: $1044F); Name: 'Deseret'),
(Range:(RangeStart: $10450; RangeEnd: $1047F); Name: 'Shavian'),
(Range:(RangeStart: $10480; RangeEnd: $104AF); Name: 'Osmanya'),
(Range:(RangeStart: $104B0; RangeEnd: $104FF); Name: 'Osage'),
(Range:(RangeStart: $10500; RangeEnd: $1052F); Name: 'Elbasan'),
(Range:(RangeStart: $10530; RangeEnd: $1056F); Name: 'Caucasian Albanian'),
(Range:(RangeStart: $10600; RangeEnd: $1077F); Name: 'Linear A'),
(Range:(RangeStart: $10800; RangeEnd: $1083F); Name: 'Cypriot Syllabary'),
(Range:(RangeStart: $10840; RangeEnd: $1085F); Name: 'Imperial Aramaic'),
(Range:(RangeStart: $10860; RangeEnd: $1087F); Name: 'Palmyrene'),
(Range:(RangeStart: $10880; RangeEnd: $108AF); Name: 'Nabataean'),
(Range:(RangeStart: $108E0; RangeEnd: $108FF); Name: 'Hatran'),
(Range:(RangeStart: $10900; RangeEnd: $1091F); Name: 'Phoenician'),
(Range:(RangeStart: $10920; RangeEnd: $1093F); Name: 'Lydian'),
(Range:(RangeStart: $10980; RangeEnd: $1099F); Name: 'Meroitic Hieroglyphs'),
(Range:(RangeStart: $109A0; RangeEnd: $109FF); Name: 'Meroitic Cursive'),
(Range:(RangeStart: $10A00; RangeEnd: $10A5F); Name: 'Kharoshthi'),
(Range:(RangeStart: $10A60; RangeEnd: $10A7F); Name: 'Old South Arabian'),
(Range:(RangeStart: $10A80; RangeEnd: $10A9F); Name: 'Old North Arabian'),
(Range:(RangeStart: $10AC0; RangeEnd: $10AFF); Name: 'Manichaean'),
(Range:(RangeStart: $10B00; RangeEnd: $10B3F); Name: 'Avestan'),
(Range:(RangeStart: $10B40; RangeEnd: $10B5F); Name: 'Inscriptional Parthian'),
(Range:(RangeStart: $10B60; RangeEnd: $10B7F); Name: 'Inscriptional Pahlavi'),
(Range:(RangeStart: $10B80; RangeEnd: $10BAF); Name: 'Psalter Pahlavi'),
(Range:(RangeStart: $10C00; RangeEnd: $10C4F); Name: 'Old Turkic'),
(Range:(RangeStart: $10C80; RangeEnd: $10CFF); Name: 'Old Hungarian'),
(Range:(RangeStart: $10D00; RangeEnd: $10D3F); Name: 'Hanifi Rohingya'),
(Range:(RangeStart: $10E60; RangeEnd: $10E7F); Name: 'Rumi Numeral Symbols'),
(Range:(RangeStart: $10E80; RangeEnd: $10EBF); Name: 'Yezidi'),
(Range:(RangeStart: $10F00; RangeEnd: $10F2F); Name: 'Old Sogdian'),
(Range:(RangeStart: $10F30; RangeEnd: $10FAF); Name: 'Sogdian'),
(Range:(RangeStart: $10FB0; RangeEnd: $10FDF); Name: 'Chorasmian'),
(Range:(RangeStart: $10FE0; RangeEnd: $10FFF); Name: 'Elymaic'),
(Range:(RangeStart: $11000; RangeEnd: $1107F); Name: 'Brahmi'),
(Range:(RangeStart: $11080; RangeEnd: $110CF); Name: 'Kaithi'),
(Range:(RangeStart: $110D0; RangeEnd: $110FF); Name: 'Sora Sompeng'),
(Range:(RangeStart: $11100; RangeEnd: $1114F); Name: 'Chakma'),
(Range:(RangeStart: $11150; RangeEnd: $1117F); Name: 'Mahajani'),
(Range:(RangeStart: $11180; RangeEnd: $111DF); Name: 'Sharada'),
(Range:(RangeStart: $111E0; RangeEnd: $111FF); Name: 'Sinhala Archaic Numbers'),
(Range:(RangeStart: $11200; RangeEnd: $1124F); Name: 'Khojki'),
(Range:(RangeStart: $11280; RangeEnd: $112AF); Name: 'Multani'),
(Range:(RangeStart: $112B0; RangeEnd: $112FF); Name: 'Khudawadi'),
(Range:(RangeStart: $11300; RangeEnd: $1137F); Name: 'Grantha'),
(Range:(RangeStart: $11400; RangeEnd: $1147F); Name: 'Newa'),
(Range:(RangeStart: $11480; RangeEnd: $114DF); Name: 'Tirhuta'),
(Range:(RangeStart: $11580; RangeEnd: $115FF); Name: 'Siddam'),
(Range:(RangeStart: $11600; RangeEnd: $1165F); Name: 'Modi'),
(Range:(RangeStart: $11660; RangeEnd: $1167F); Name: 'Mongolian Supplement'),
(Range:(RangeStart: $11680; RangeEnd: $116CF); Name: 'Takri'),
(Range:(RangeStart: $11700; RangeEnd: $1173F); Name: 'Ahom'),
(Range:(RangeStart: $11800; RangeEnd: $1184F); Name: 'Dogra'),