1 * Collation Data structure and code
3 ** This document is not up to date
5 Currently the table generator generates all three kind of files
6 (C header, C# source and binary resources) but only binary resources
7 are used in fact. C# source is useful for debugging. C header is
11 ** Manual tasks required to maintain the source.
13 We should always pay attention to the contants for CodePointIndexer
14 that is likely not be in sync with the constant arrays.
19 Note: the structures are similar in MSCompatUnicodeTable.cs but now
24 ushort tailoringIndex;
25 ushort tailoringCount;
26 short reverseAccentOrder; /* 1:French sort. 0:Normal */
29 Those [*] characters will be compressed using CodePointIndexer
30 whose max value is char.MaxValue+1.
32 // Holds sortkey basis.
37 guint8 [*] ignorableFlags; // 1:complete, 2:symbol, 3:nonspace
38 gunichar [*] widthCompat;
40 // Holds special arrays for CJK order which is culture dependent.
46 gunichar [whole_tailoring_count] tailorings;
47 CollationSource [culture_count] collationSources;
49 "tailorings" table holds the entire contract mappings and expansion
50 mappings for all cultures.
51 Actually it is not only "culture dependent tailorings" but also
52 contains expansions for Invariant culture.
53 CollationSource.tailoringIndex holds the index of "tailorings" array
54 to point where its tailorings begin.
55 Tailorings for the culture is counted by tailoringCount.
57 If tailoringIndex is 0 then there is no tailorings for the specific
58 culture (it should still handle invariant tailorings).
60 ** CollationSourceUtil.cs
61 static CodePointIndexer Category;
62 static CodePointIndexer Level1;
63 static CodePointIndexer Level2;
64 static CodePointIndexer Level3;
65 static CodePointIndexer Ignorable;
66 static CodePointIndexer WidthCompat;
67 static CodePointIndexer CjkCHS;
68 static CodePointIndexer Cjk;
72 static byte [*] category;
73 static byte [*] level1;
74 static byte [*] level2;
75 static byte [*] level3;
76 static byte [*] ignorableFlags; // 1:complete, 2:symbol, 3:nonspace
77 static char [*] widthCompat;
78 static char [] tailorings;
79 static ushort [] cjkCHS;
80 static ushort [] cjkCHT;
81 static ushort [] cjkJA;
82 static ushort [] cjkKO;
83 static byte [] cjkKOlv2;
85 class TailoringInfo // instantiated for each CultureInfo