1 // © 2016 and later: Unicode, Inc. and others. 2 // License & terms of use: http://www.unicode.org/copyright.html#License 3 /* 4 ******************************************************************************* 5 * Copyright (C) 2012-2016, International Business Machines 6 * Corporation and others. All Rights Reserved. 7 ******************************************************************************* 8 * CollationFCD.java, ported from collationfcd.h/.cpp 9 * 10 * C++ version created on: 2012aug18 11 * created by: Markus W. Scherer 12 */ 13 14 package com.ibm.icu.impl.coll; 15 16 import com.ibm.icu.text.UTF16; 17 18 /** 19 * Data and functions for the FCD check fast path. 20 * 21 * The fast path looks at a pair of 16-bit code units and checks 22 * whether there is an FCD boundary between them; 23 * there is if the first unit has a trailing ccc=0 (!hasTccc(first)) 24 * or the second unit has a leading ccc=0 (!hasLccc(second)), 25 * or both. 26 * When the fast path finds a possible non-boundary, 27 * then the FCD check slow path looks at the actual sequence of FCD values. 28 * 29 * This is a pure optimization. 30 * The fast path must at least find all possible non-boundaries. 31 * If the fast path is too pessimistic, it costs performance. 32 * 33 * For a pair of BMP characters, the fast path tests are precise (1 bit per character). 34 * 35 * For a supplementary code point, the two units are its lead and trail surrogates. 36 * We set hasTccc(lead)=true if any of its 1024 associated supplementary code points 37 * has lccc!=0 or tccc!=0. 38 * We set hasLccc(trail)=true for all trail surrogates. 39 * As a result, we leave the fast path if the lead surrogate might start a 40 * supplementary code point that is not FCD-inert. 41 * (So the fast path need not detect that there is a surrogate pair, 42 * nor look ahead to the next full code point.) 43 * 44 * hasLccc(lead)=true if any of its 1024 associated supplementary code points 45 * has lccc!=0, for fast boundary checking between BMP & supplementary. 46 * 47 * hasTccc(trail)=false: 48 * It should only be tested for unpaired trail surrogates which are FCD-inert. 49 */ 50 public final class CollationFCD { hasLccc(int c)51 public static boolean hasLccc(int c) { 52 assert c <= 0xffff; 53 // c can be negative, e.g., Collation.SENTINEL_CP from UCharIterator; 54 // that is handled in the first test. 55 int i; 56 return 57 // U+0300 is the first character with lccc!=0. 58 c >= 0x300 && 59 (i = lcccIndex[c >> 5]) != 0 && 60 (lcccBits[i] & (1 << (c & 0x1f))) != 0; 61 } 62 hasTccc(int c)63 public static boolean hasTccc(int c) { 64 assert c <= 0xffff; 65 // c can be negative, e.g., Collation.SENTINEL_CP from UCharIterator; 66 // that is handled in the first test. 67 int i; 68 return 69 // U+00C0 is the first character with tccc!=0. 70 c >= 0xc0 && 71 (i = tcccIndex[c >> 5]) != 0 && 72 (tcccBits[i] & (1 << (c & 0x1f))) != 0; 73 } 74 mayHaveLccc(int c)75 static boolean mayHaveLccc(int c) { 76 // Handles all of Unicode 0..10FFFF. 77 // c can be negative, e.g., Collation.SENTINEL_CP. 78 // U+0300 is the first character with lccc!=0. 79 if(c < 0x300) { return false; } 80 if(c > 0xffff) { c = UTF16.getLeadSurrogate(c); } 81 int i; 82 return 83 (i = lcccIndex[c >> 5]) != 0 && 84 (lcccBits[i] & (1 << (c & 0x1f))) != 0; 85 } 86 87 /** 88 * Tibetan composite vowel signs (U+0F73, U+0F75, U+0F81) 89 * must be decomposed before reaching the core collation code, 90 * or else some sequences including them, even ones passing the FCD check, 91 * do not yield canonically equivalent results. 92 * 93 * This is a fast and imprecise test. 94 * 95 * @param c a code point 96 * @return true if c is U+0F73, U+0F75 or U+0F81 or one of several other Tibetan characters 97 */ maybeTibetanCompositeVowel(int c)98 static boolean maybeTibetanCompositeVowel(int c) { 99 return (c & 0x1fff01) == 0xf01; 100 } 101 102 /** 103 * Tibetan composite vowel signs (U+0F73, U+0F75, U+0F81) 104 * must be decomposed before reaching the core collation code, 105 * or else some sequences including them, even ones passing the FCD check, 106 * do not yield canonically equivalent results. 107 * 108 * They have distinct lccc/tccc combinations: 129/130 or 129/132. 109 * 110 * @param fcd16 the FCD value (lccc/tccc combination) of a code point 111 * @return true if fcd16 is from U+0F73, U+0F75 or U+0F81 112 */ isFCD16OfTibetanCompositeVowel(int fcd16)113 static boolean isFCD16OfTibetanCompositeVowel(int fcd16) { 114 return fcd16 == 0x8182 || fcd16 == 0x8184; 115 } 116 117 // CollationFCD(); // No instantiation. 118 119 // TODO: machine-generate by: icu/tools/unicode/c/genuca/genuca.cpp 120 121 private static final byte[] lcccIndex={ 122 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 123 0,0,0,0,0,0,0,0,1,1,2,3,0,0,0,0, 124 0,0,0,0,4,0,0,0,0,0,0,0,5,6,7,0, 125 8,0,9,0xa,0,0,0xb,0xc,0xd,0xe,0xf,0,0,0,0,0x10, 126 0x11,0x12,0x13,0,0,0,0x14,0x15,0,0x16,0x17,0,0,0x16,0x18,0x19, 127 0,0x16,0x18,0,0,0x16,0x18,0,0,0x16,0x18,0,0,0,0x18,0, 128 0,0,0x1a,0,0,0x16,0x18,0,0,0x1b,0x18,0,0,0,0x1c,0, 129 0,0x1d,0x1e,0,0,0x1f,0x1e,0,0x1f,0x20,0,0x21,0x22,0,0x23,0, 130 0,0x24,0,0,0x18,0,0,0,0,0,0,0,0,0,0,0, 131 0,0,0,0,0,0,0,0,0,0,0x25,0,0,0,0,0, 132 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 133 0,0,0,0,0,0,0,0,0x26,0x26,0,0,0,0,0x27,0, 134 0,0,0,0,0,0x28,0,0,0,0x13,0,0,0,0,0,0, 135 0x29,0,0,0x2a,0,0x2b,0,0,0,0x26,0x2c,0x2d,0,0x2e,0,0x2f, 136 0,0x30,0,0,0,0,0x31,0x32,0,0,0,0,0,0,1,0x33, 137 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 138 0,0,0,0,0,0,0x34,0x35,0,0,0,0,0,0,0,0, 139 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 140 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 141 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 142 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 143 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 144 0,0,0,0,0,0,0,0x36,0,0,0,0x37,0,0,0,1, 145 0,0,0,0,0,0,0,0,0,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 233 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 234 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 235 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 236 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 237 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 238 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 239 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 240 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 241 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 242 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 243 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 244 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 245 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 246 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 247 0,0,0,0,0,0,0,0,0x19,0,0,0,0,0,0,0, 248 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 249 0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0 250 }; 251 252 private static final byte[] tcccIndex={ 253 0,0,0,0,0,0,2,3,4,5,6,7,0,8,9,0xa, 254 0xb,0xc,0,0,0,0,0,0,1,1,0xd,0xe,0xf,0x10,0x11,0, 255 0x12,0x13,0x14,0x15,0x16,0,0x17,0x18,0,0,0,0,0x19,0x1a,0x1b,0, 256 0x1c,0x1d,0x1e,0x1f,0,0,0x20,0x21,0x22,0x23,0x24,0,0,0,0,0x25, 257 0x26,0x27,0x28,0,0,0,0x29,0x2a,0,0x2b,0x2c,0,0,0x2d,0x2e,0x2f, 258 0,0x30,0x31,0,0,0x2d,0x32,0,0,0x2d,0x33,0,0,0,0x32,0, 259 0,0,0x34,0,0,0x2d,0x32,0,0,0x35,0x32,0,0,0,0x36,0, 260 0,0x37,0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0,0,0,0,0,0,0,0,0,0,0,0,0,0, 373 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 374 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 375 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 376 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 377 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 378 0,0,0,0,0,0,0,0,0x3f,0x76,0x77,0,0,0,0,0, 379 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 380 0,0xe,0,0,0,0,0,0,0,0,0,0,0,0,0,0 381 }; 382 383 private static final int[] lcccBits={ 384 0,0xffffffff,0xffff7fff,0xffff,0xf8,0xfffe0000,0xbfffffff,0xb6,0x7ff0000,0xfffff800,0x10000,0x9fc00000,0x3d9f,0x20000,0xffff0000,0x7ff, 385 0x200ff800,0xfbc00000,0x3eef,0xe000000,0xfff80000,0xfffffffb,0x10000000,0x1e2000,0x2000,0x40000000,0x602000,0x18000000,0x400,0x7000000,0xf00,0x3000000, 386 0x2a00000,0x3c3e0000,0xdf,0x40,0x6800000,0xe0000000,0x100000,0x20040000,0x200,0x1800000,0x9fe00001,0x3fff0000,0x10,0xff800,0xc00,0xc0040, 387 0x800000,0xfff70000,0x31021fd,0xfbffffff,0x1fff0000,0x1ffe2,0x38000,0x80000000,0xfc00,0x6000000,0x3ff08000,0xc0000000,0x30000,0x3ffff,0x3800,0x80000, 388 1,0xc19d0000,2,0x400000,0x40000fd,0x5108000 389 }; 390 private static final int[] tcccBits={ 391 0,0xffffffff,0x3e7effbf,0xbe7effbf,0xfffcffff,0x7ef1ff3f,0xfff3f1f8,0x7fffff3f,0x18003,0xdfffe000,0xff31ffcf,0xcfffffff,0xfffc0,0xffff7fff,0xffff,0x1d760, 392 0x1fc00,0x187c00,0x200708b,0x2000000,0x708b0000,0xc00000,0xf8,0xfccf0006,0x33ffcfc,0xfffe0000,0xbfffffff,0xb6,0x7ff0000,0x7c,0xfffff800,0x10000, 393 0x9fc80005,0x3d9f,0x20000,0xffff0000,0x7ff,0x200ff800,0xfbc00000,0x3eef,0xe000000,0xfff80000,0xfffffffb,0x10120200,0xff1e2000,0x10000000,0xb0002000,0x40000000, 394 0x10480000,0x4e002000,0x2000,0x30002000,0x602100,0x18000000,0x24000400,0x7000000,0xf00,0x3000000,0x2a00000,0x3d7e0000,0xdf,0x40,0x6800000,0xe0000000, 395 0x100000,0x20040000,0x200,0x1800000,0x9fe00001,0x3fff0000,0x10,0xff800,0xc00,0xc0040,0x800000,0xfff70000,0x31021fd,0xfbffffff,0xbffffff,0x3ffffff, 396 0x3f3fffff,0xaaff3f3f,0x3fffffff,0x1fdfffff,0xefcfffde,0x1fdc7fff,0x1fff0000,0x1ffe2,0x800,0xc000000,0x4000,0xe000,0x1210,0x50,0x292,0x333e005, 397 0x333,0xf000,0x3c0f,0x38000,0x80000000,0xfc00,0x55555000,0x36db02a5,0x46100000,0x47900000,0x3ff08000,0xc0000000,0x30000,0x3ffff,0x3800,0x80000, 398 1,0xc19d0000,2,0x400000,0x40000fd,0x5108000,0x5f7ffc00,0x7fdb 399 }; 400 401 } 402