1 /*
2 * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 7071819
27 * @summary tests Unicode Extended Grapheme support
28 * @run main GraphemeTest
29 */
30
31 import java.io.IOException;
32 import java.nio.file.Files;
33 import java.nio.file.Path;
34 import java.nio.file.Paths;
35 import java.util.Arrays;
36 import java.util.ArrayList;
37 import java.util.Scanner;
38 import java.util.regex.Pattern;
39 import java.util.regex.Matcher;
40
41 public class GraphemeTest {
42
43 public static void main(String[] args) throws Throwable {
44 testProps(Paths.get(System.getProperty("test.src", "."),
45 "GraphemeBreakProperty.txt"));
46 testBreak(Paths.get(System.getProperty("test.src", "."),
47 "GraphemeBreakTest.txt"));
48 }
49
50 private static void testProps(Path path) throws IOException {
51 Files.lines(path)
52 .filter( ln -> ln.length() != 0 && !ln.startsWith("#") )
53 .forEach(ln -> {
54 String[] strs = ln.split("\\s+");
55 int off = strs[0].indexOf("..");
56 int cp0, cp1;
57 String expected = strs[2];
58 if (off != -1) {
59 cp0 = Integer.parseInt(strs[0], 0, off, 16);
60 cp1 = Integer.parseInt(strs[0], off + 2, strs[0].length(), 16);
61 } else {
62 cp0 = cp1 = Integer.parseInt(strs[0], 16);
63 }
64 for (int cp = cp0; cp <= cp1; cp++) {
65 // NOTE:
66 // #tr29 "plus a few General_Category = Spacing_Mark needed for
67 // canonical equivalence."
68 // For "extended grapheme clusters" support, there is no
69 // need actually to diff "extend" and "spackmark" given GB9, GB9a.
70 if (!expected.equals(types[getType(cp)])) {
71 if ("Extend".equals(expected) &&
72 "SpacingMark".equals(types[getType(cp)]))
73 System.out.printf("[%x] [%s][%d] -> [%s]%n",
74 cp, expected, Character.getType(cp), types[getType(cp)]);
75 else
76 throw new RuntimeException(String.format(
77 "cp=[%x], expeced:[%s] result:[%s]%n",
78 cp, expected, types[getType(cp)]));
79 }
80 }
81 });
82 }
83
84 private static void testBreak(Path path) throws IOException {
85 Files.lines(path)
86 .filter( ln -> ln.length() != 0 && !ln.startsWith("#") )
87 .forEach(ln -> {
88 String str = ln.replaceAll("\\s+|\\([a-zA-Z]+\\)|\\[[a-zA-Z]]+\\]|#.*", "");
89 // System.out.println(str);
90 String[] cstrs = str.split("\u00f7|\u00d7");
91 int prevCp = -1;
92 char prevBk = '\u00f7';
93 int offBk = 0;
94 for (String cstr : cstrs) {
95 if (cstr.length() == 0) // first empty str
96 continue;
97 int cp = Integer.parseInt(cstr, 16);
98 if (prevCp == -1) {
99 prevCp = cp;
100 } else {
101 // test against the rules directly
102 if (rules[getType(prevCp)][getType(cp)] != (prevBk == '\u00f7')) {
103 throw new RuntimeException(String.format(
104 "NG %x[%d] %x[%d] -> %b [%s]%n",
105 prevCp, getType(prevCp), cp, getType(cp),
106 rules[getType(prevCp)][getType(cp)],
107 ln));
108 }
109 }
110 prevCp = cp;
111 offBk += (cstr.length() + 1);
112 prevBk = str.charAt(offBk);
113 }
114 });
115 }
116
117 private static final String[] types = {
118 "Other", "CR", "LF", "Control", "Extend", "Regional_Indicator",
119 "Prepend", "SpacingMark",
120 "L", "V", "T", "LV", "LVT" };
121
122 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
123
124 // types
125 private static final int OTHER = 0;
126 private static final int CR = 1;
127 private static final int LF = 2;
128 private static final int CONTROL = 3;
129 private static final int EXTEND = 4;
130 private static final int RI = 5;
131 private static final int PREPEND = 6;
132 private static final int SPACINGMARK = 7;
133 private static final int L = 8;
134 private static final int V = 9;
135 private static final int T = 10;
136 private static final int LV = 11;
137 private static final int LVT = 12;
138
139 private static final int FIRST_TYPE = 0;
140 private static final int LAST_TYPE = 12;
141
142 private static boolean[][] rules;
143 static {
144 rules = new boolean[LAST_TYPE + 1][LAST_TYPE + 1];
145 // default, any + any
146 for (int i = FIRST_TYPE; i <= LAST_TYPE; i++)
147 for (int j = FIRST_TYPE; j <= LAST_TYPE; j++)
148 rules[i][j] = true;
149 // GB 6 L x (L | V | LV | VT)
150 rules[L][L] = false;
151 rules[L][V] = false;
152 rules[L][LV] = false;
153 rules[L][LVT] = false;
154 // GB 7 (LV | V) x (V | T)
155 rules[LV][V] = false;
156 rules[LV][T] = false;
157 rules[V][V] = false;
158 rules[V][T] = false;
159 // GB 8 (LVT | T) x T
160 rules[LVT][T] = false;
161 rules[T][T] = false;
162 // GB 8a RI x RI
163 rules[RI][RI] = false;
164 // GB 9 x Extend
165 // GB 9a x Spacing Mark
166 // GB 9b Prepend x
167 for (int i = FIRST_TYPE; i <= LAST_TYPE; i++) {
168 rules[i][EXTEND] = false;
169 rules[i][SPACINGMARK] = false;
170 rules[PREPEND][i] = false;
171 }
172 // GB 4 (Control | CR | LF) +
173 // GB 5 + (Control | CR | LF)
174 for (int i = FIRST_TYPE; i <= LAST_TYPE; i++)
175 for (int j = CR; j <= CONTROL; j++) {
176 rules[i][j] = true;
177 rules[j][i] = true;
178 }
179 // GB 3 CR x LF
180 rules[CR][LF] = false;
181 // GB 10 Any + Any -> default
182 }
183
184 // Hangul syllables
185 private static final int SYLLABLE_BASE = 0xAC00;
186 private static final int LCOUNT = 19;
187 private static final int VCOUNT = 21;
188 private static final int TCOUNT = 28;
189 private static final int NCOUNT = VCOUNT * TCOUNT; // 588
190 private static final int SCOUNT = LCOUNT * NCOUNT; // 11172
191
192 // #tr29: SpacingMark exceptions: The following (which have
193 // General_Category = Spacing_Mark and would otherwise be included)
194 // are specifically excluded
195 private static boolean isExcludedSpacingMark(int cp) {
196 return cp == 0x102B || cp == 0x102C || cp == 0x1038 ||
197 cp >= 0x1062 && cp <= 0x1064 ||
198 cp >= 0x1062 && cp <= 0x106D ||
199 cp == 0x1083 ||
200 cp >= 0x1087 && cp <= 0x108C ||
201 cp == 0x108F ||
202 cp >= 0x109A && cp <= 0x109C ||
203 cp == 0x1A61 || cp == 0x1A63 || cp == 0x1A64 ||
204 cp == 0xAA7B || cp == 0xAA7D;
205 }
206
207 private static int getType(int cp) {
208 int type = Character.getType(cp);
209 switch(type) {
210 case Character.CONTROL:
211 if (cp == 0x000D)
212 return CR;
213 if (cp == 0x000A)
214 return LF;
215 return CONTROL;
216 case Character.UNASSIGNED:
217 // NOTE: #tr29 lists "Unassigned and Default_Ignorable_Code_Point" as Control
218 // but GraphemeBreakTest.txt lists u+0378/reserved-0378 as "Other"
219 // so type it as "Other" to make the test happy
220 if (cp == 0x0378)
221 return OTHER;
222 case Character.LINE_SEPARATOR:
223 case Character.PARAGRAPH_SEPARATOR:
224 case Character.SURROGATE:
225 return CONTROL;
226 case Character.FORMAT:
227 if (cp == 0x200C || cp == 0x200D)
228 return EXTEND;
229 return CONTROL;
230 case Character.NON_SPACING_MARK:
231 case Character.ENCLOSING_MARK:
232 // NOTE:
233 // #tr29 "plus a few General_Category = Spacing_Mark needed for
234 // canonical equivalence."
235 // but for "extended grapheme clusters" support, there is no
236 // need actually to diff "extend" and "spackmark" given GB9, GB9a
237 return EXTEND;
238 case Character.COMBINING_SPACING_MARK:
239 if (isExcludedSpacingMark(cp))
240 return OTHER;
241 // NOTE:
242 // 0x11720 and 0x11721 are mentioned in #tr29 as
243 // OTHER_LETTER but it appears their category has been updated to
244 // COMBING_SPACING_MARK already (verified in ver.8)
245 return SPACINGMARK;
246 case Character.OTHER_SYMBOL:
247 if (cp >= 0x1F1E6 && cp <= 0x1F1FF)
248 return RI;
249 return OTHER;
250 case Character.MODIFIER_LETTER:
251 // WARNING:
252 // not mentioned in #tr29 but listed in GraphemeBreakProperty.txt
253 if (cp == 0xFF9E || cp == 0xFF9F)
254 return EXTEND;
255 return OTHER;
256 case Character.OTHER_LETTER:
257 if (cp == 0x0E33 || cp == 0x0EB3)
258 return SPACINGMARK;
259 // hangul jamo
260 if (cp >= 0x1100 && cp <= 0x11FF) {
261 if (cp <= 0x115F)
262 return L;
263 if (cp <= 0x11A7)
264 return V;
265 return T;
266 }
267 // hangul syllables
268 int sindex = cp - SYLLABLE_BASE;
269 if (sindex >= 0 && sindex < SCOUNT) {
270
271 if (sindex % TCOUNT == 0)
272 return LV;
273 return LVT;
274 }
275 // hangul jamo_extended A
276 if (cp >= 0xA960 && cp <= 0xA97C)
277 return L;
278 // hangul jamo_extended B
279 if (cp >= 0xD7B0 && cp <= 0xD7C6)
280 return V;
281 if (cp >= 0xD7CB && cp <= 0xD7FB)
282 return T;
283 }
284 return OTHER;
285 }
286 }
|
1 /*
2 * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 7071819 8221431
27 * @summary tests Unicode Extended Grapheme support
28 * @library /lib/testlibrary/java/lang
29 * @run main GraphemeTest
30 */
31
32 import java.io.IOException;
33 import java.nio.file.Files;
34 import java.nio.file.Path;
35 import java.nio.file.Paths;
36 import java.util.Arrays;
37 import java.util.ArrayList;
38 import java.util.Scanner;
39 import java.util.regex.Pattern;
40 import java.util.regex.Matcher;
41
42 public class GraphemeTest {
43
44 public static void main(String[] args) throws Throwable {
45 testProps(UCDFiles.GRAPHEME_BREAK_PROPERTY);
46 testProps(UCDFiles.EMOJI_DATA);
47 }
48
49 private static void testProps(Path path) throws IOException {
50 Files.lines(path)
51 .map( ln -> ln.replaceFirst("#.*", "") )
52 .filter( ln -> ln.length() != 0 )
53 .forEach(ln -> {
54 String[] strs = ln.split("\\s+");
55 int off = strs[0].indexOf("..");
56 int cp0, cp1;
57 String expected = strs[2];
58 if (off != -1) {
59 cp0 = Integer.parseInt(strs[0], 0, off, 16);
60 cp1 = Integer.parseInt(strs[0], off + 2, strs[0].length(), 16);
61 } else {
62 cp0 = cp1 = Integer.parseInt(strs[0], 16);
63 }
64 for (int cp = cp0; cp <= cp1; cp++) {
65 // Ignore Emoji* for now (only interested in Extended_Pictographic)
66 if (expected.startsWith("Emoji")) {
67 continue;
68 }
69
70 // NOTE:
71 // #tr29 "plus a few General_Category = Spacing_Mark needed for
72 // canonical equivalence."
73 // For "extended grapheme clusters" support, there is no
74 // need actually to diff "extend" and "spackmark" given GB9, GB9a.
75 if (!expected.equals(types[getType(cp)])) {
76 if ("Extend".equals(expected) &&
77 "SpacingMark".equals(types[getType(cp)]))
78 System.out.printf("[%x] [%s][%d] -> [%s]%n",
79 cp, expected, Character.getType(cp), types[getType(cp)]);
80 else
81 throw new RuntimeException(String.format(
82 "cp=[%x], expeced:[%s] result:[%s]%n",
83 cp, expected, types[getType(cp)]));
84 }
85 }
86 });
87 }
88
89 private static final String[] types = {
90 "Other", "CR", "LF", "Control", "Extend", "ZWJ", "Regional_Indicator",
91 "Prepend", "SpacingMark",
92 "L", "V", "T", "LV", "LVT",
93 "Extended_Pictographic" };
94
95 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
96
97 // from java.util.regex.Grapheme.java
98 // types
99 private static final int OTHER = 0;
100 private static final int CR = 1;
101 private static final int LF = 2;
102 private static final int CONTROL = 3;
103 private static final int EXTEND = 4;
104 private static final int ZWJ = 5;
105 private static final int RI = 6;
106 private static final int PREPEND = 7;
107 private static final int SPACINGMARK = 8;
108 private static final int L = 9;
109 private static final int V = 10;
110 private static final int T = 11;
111 private static final int LV = 12;
112 private static final int LVT = 13;
113 private static final int EXTENDED_PICTOGRAPHIC = 14;
114
115 private static final int FIRST_TYPE = 0;
116 private static final int LAST_TYPE = 14;
117
118 private static boolean[][] rules;
119 static {
120 rules = new boolean[LAST_TYPE + 1][LAST_TYPE + 1];
121 // GB 999 Any + Any -> default
122 for (int i = FIRST_TYPE; i <= LAST_TYPE; i++)
123 for (int j = FIRST_TYPE; j <= LAST_TYPE; j++)
124 rules[i][j] = true;
125 // GB 6 L x (L | V | LV | VT)
126 rules[L][L] = false;
127 rules[L][V] = false;
128 rules[L][LV] = false;
129 rules[L][LVT] = false;
130 // GB 7 (LV | V) x (V | T)
131 rules[LV][V] = false;
132 rules[LV][T] = false;
133 rules[V][V] = false;
134 rules[V][T] = false;
135 // GB 8 (LVT | T) x T
136 rules[LVT][T] = false;
137 rules[T][T] = false;
138 // GB 9 x (Extend|ZWJ)
139 // GB 9a x Spacing Mark
140 // GB 9b Prepend x
141 for (int i = FIRST_TYPE; i <= LAST_TYPE; i++) {
142 rules[i][EXTEND] = false;
143 rules[i][ZWJ] = false;
144 rules[i][SPACINGMARK] = false;
145 rules[PREPEND][i] = false;
146 }
147 // GB 4 (Control | CR | LF) +
148 // GB 5 + (Control | CR | LF)
149 for (int i = FIRST_TYPE; i <= LAST_TYPE; i++)
150 for (int j = CR; j <= CONTROL; j++) {
151 rules[i][j] = true;
152 rules[j][i] = true;
153 }
154 // GB 3 CR x LF
155 rules[CR][LF] = false;
156 // GB 11 Exended_Pictographic x (Extend|ZWJ)
157 rules[EXTENDED_PICTOGRAPHIC][EXTEND] = false;
158 rules[EXTENDED_PICTOGRAPHIC][ZWJ] = false;
159 }
160
161 // Hangul syllables
162 private static final int SYLLABLE_BASE = 0xAC00;
163 private static final int LCOUNT = 19;
164 private static final int VCOUNT = 21;
165 private static final int TCOUNT = 28;
166 private static final int NCOUNT = VCOUNT * TCOUNT; // 588
167 private static final int SCOUNT = LCOUNT * NCOUNT; // 11172
168
169 // #tr29: SpacingMark exceptions: The following (which have
170 // General_Category = Spacing_Mark and would otherwise be included)
171 // are specifically excluded
172 private static boolean isExcludedSpacingMark(int cp) {
173 return cp == 0x102B || cp == 0x102C || cp == 0x1038 ||
174 cp >= 0x1062 && cp <= 0x1064 ||
175 cp >= 0x1062 && cp <= 0x106D ||
176 cp == 0x1083 ||
177 cp >= 0x1087 && cp <= 0x108C ||
178 cp == 0x108F ||
179 cp >= 0x109A && cp <= 0x109C ||
180 cp == 0x1A61 || cp == 0x1A63 || cp == 0x1A64 ||
181 cp == 0xAA7B || cp == 0xAA7D;
182 }
183
184 @SuppressWarnings("fallthrough")
185 private static int getType(int cp) {
186 if (isExtendedPictographic(cp)) {
187 return EXTENDED_PICTOGRAPHIC;
188 }
189
190 int type = Character.getType(cp);
191 switch(type) {
192 case Character.CONTROL:
193 if (cp == 0x000D)
194 return CR;
195 if (cp == 0x000A)
196 return LF;
197 return CONTROL;
198 case Character.UNASSIGNED:
199 // NOTE: #tr29 lists "Unassigned and Default_Ignorable_Code_Point" as Control
200 // but GraphemeBreakTest.txt lists u+0378/reserved-0378 as "Other"
201 // so type it as "Other" to make the test happy
202 if (cp == 0x0378)
203 return OTHER;
204
205 case Character.LINE_SEPARATOR:
206 case Character.PARAGRAPH_SEPARATOR:
207 case Character.SURROGATE:
208 return CONTROL;
209 case Character.FORMAT:
210 if (cp == 0x200C ||
211 cp >= 0xE0020 && cp <= 0xE007F)
212 return EXTEND;
213 if (cp == 0x200D)
214 return ZWJ;
215 if (cp >= 0x0600 && cp <= 0x0605 ||
216 cp == 0x06DD || cp == 0x070F || cp == 0x08E2 ||
217 cp == 0x110BD || cp == 0x110CD)
218 return PREPEND;
219 return CONTROL;
220 case Character.NON_SPACING_MARK:
221 case Character.ENCLOSING_MARK:
222 // NOTE:
223 // #tr29 "plus a few General_Category = Spacing_Mark needed for
224 // canonical equivalence."
225 // but for "extended grapheme clusters" support, there is no
226 // need actually to diff "extend" and "spackmark" given GB9, GB9a
227 return EXTEND;
228 case Character.COMBINING_SPACING_MARK:
229 if (isExcludedSpacingMark(cp))
230 return OTHER;
231 // NOTE:
232 // 0x11720 and 0x11721 are mentioned in #tr29 as
233 // OTHER_LETTER but it appears their category has been updated to
234 // COMBING_SPACING_MARK already (verified in ver.8)
235 return SPACINGMARK;
236 case Character.OTHER_SYMBOL:
237 if (cp >= 0x1F1E6 && cp <= 0x1F1FF)
238 return RI;
239 return OTHER;
240 case Character.MODIFIER_LETTER:
241 case Character.MODIFIER_SYMBOL:
242 // WARNING:
243 // not mentioned in #tr29 but listed in GraphemeBreakProperty.txt
244 if (cp == 0xFF9E || cp == 0xFF9F ||
245 cp >= 0x1F3FB && cp <= 0x1F3FF)
246 return EXTEND;
247 return OTHER;
248 case Character.OTHER_LETTER:
249 if (cp == 0x0E33 || cp == 0x0EB3)
250 return SPACINGMARK;
251 // hangul jamo
252 if (cp >= 0x1100 && cp <= 0x11FF) {
253 if (cp <= 0x115F)
254 return L;
255 if (cp <= 0x11A7)
256 return V;
257 return T;
258 }
259 // hangul syllables
260 int sindex = cp - SYLLABLE_BASE;
261 if (sindex >= 0 && sindex < SCOUNT) {
262
263 if (sindex % TCOUNT == 0)
264 return LV;
265 return LVT;
266 }
267 // hangul jamo_extended A
268 if (cp >= 0xA960 && cp <= 0xA97C)
269 return L;
270 // hangul jamo_extended B
271 if (cp >= 0xD7B0 && cp <= 0xD7C6)
272 return V;
273 if (cp >= 0xD7CB && cp <= 0xD7FB)
274 return T;
275
276 // Prepend
277 switch (cp) {
278 case 0x0D4E:
279 case 0x111C2:
280 case 0x111C3:
281 case 0x11A3A:
282 case 0x11A84:
283 case 0x11A85:
284 case 0x11A86:
285 case 0x11A87:
286 case 0x11A88:
287 case 0x11A89:
288 case 0x11D46:
289 return PREPEND;
290 }
291 }
292 return OTHER;
293 }
294
295 // from generated java.util.regex.EmojiData.java
296 static boolean isExtendedPictographic(int cp) {
297 return
298 cp == 0x00A9 ||
299 cp == 0x00AE ||
300 cp == 0x203C ||
301 cp == 0x2049 ||
302 cp == 0x2122 ||
303 cp == 0x2139 ||
304 (cp >= 0x2194 && cp <= 0x2199) ||
305 cp == 0x21A9 ||
306 cp == 0x21AA ||
307 cp == 0x231A ||
308 cp == 0x231B ||
309 cp == 0x2328 ||
310 cp == 0x2388 ||
311 cp == 0x23CF ||
312 (cp >= 0x23E9 && cp <= 0x23F3) ||
313 (cp >= 0x23F8 && cp <= 0x23FA) ||
314 cp == 0x24C2 ||
315 cp == 0x25AA ||
316 cp == 0x25AB ||
317 cp == 0x25B6 ||
318 cp == 0x25C0 ||
319 (cp >= 0x25FB && cp <= 0x25FE) ||
320 (cp >= 0x2600 && cp <= 0x2605) ||
321 (cp >= 0x2607 && cp <= 0x2612) ||
322 (cp >= 0x2614 && cp <= 0x2685) ||
323 (cp >= 0x2690 && cp <= 0x2705) ||
324 (cp >= 0x2708 && cp <= 0x2712) ||
325 cp == 0x2714 ||
326 cp == 0x2716 ||
327 cp == 0x271D ||
328 cp == 0x2721 ||
329 cp == 0x2728 ||
330 cp == 0x2733 ||
331 cp == 0x2734 ||
332 cp == 0x2744 ||
333 cp == 0x2747 ||
334 cp == 0x274C ||
335 cp == 0x274E ||
336 (cp >= 0x2753 && cp <= 0x2755) ||
337 cp == 0x2757 ||
338 (cp >= 0x2763 && cp <= 0x2767) ||
339 (cp >= 0x2795 && cp <= 0x2797) ||
340 cp == 0x27A1 ||
341 cp == 0x27B0 ||
342 cp == 0x27BF ||
343 cp == 0x2934 ||
344 cp == 0x2935 ||
345 (cp >= 0x2B05 && cp <= 0x2B07) ||
346 cp == 0x2B1B ||
347 cp == 0x2B1C ||
348 cp == 0x2B50 ||
349 cp == 0x2B55 ||
350 cp == 0x3030 ||
351 cp == 0x303D ||
352 cp == 0x3297 ||
353 cp == 0x3299 ||
354 (cp >= 0x1F000 && cp <= 0x1F0FF) ||
355 (cp >= 0x1F10D && cp <= 0x1F10F) ||
356 cp == 0x1F12F ||
357 (cp >= 0x1F16C && cp <= 0x1F171) ||
358 cp == 0x1F17E ||
359 cp == 0x1F17F ||
360 cp == 0x1F18E ||
361 (cp >= 0x1F191 && cp <= 0x1F19A) ||
362 (cp >= 0x1F1AD && cp <= 0x1F1E5) ||
363 (cp >= 0x1F201 && cp <= 0x1F20F) ||
364 cp == 0x1F21A ||
365 cp == 0x1F22F ||
366 (cp >= 0x1F232 && cp <= 0x1F23A) ||
367 (cp >= 0x1F23C && cp <= 0x1F23F) ||
368 (cp >= 0x1F249 && cp <= 0x1F3FA) ||
369 (cp >= 0x1F400 && cp <= 0x1F53D) ||
370 (cp >= 0x1F546 && cp <= 0x1F64F) ||
371 (cp >= 0x1F680 && cp <= 0x1F6FF) ||
372 (cp >= 0x1F774 && cp <= 0x1F77F) ||
373 (cp >= 0x1F7D5 && cp <= 0x1F7FF) ||
374 (cp >= 0x1F80C && cp <= 0x1F80F) ||
375 (cp >= 0x1F848 && cp <= 0x1F84F) ||
376 (cp >= 0x1F85A && cp <= 0x1F85F) ||
377 (cp >= 0x1F888 && cp <= 0x1F88F) ||
378 (cp >= 0x1F8AE && cp <= 0x1F8FF) ||
379 (cp >= 0x1F90C && cp <= 0x1F93A) ||
380 (cp >= 0x1F93C && cp <= 0x1F945) ||
381 (cp >= 0x1F947 && cp <= 0x1FFFD);
382
383 }
384 }
|