Skip to content

Commit 059a726

Browse files
authored
Fix Extended_Pictographic in UnicodeProperty for JSP (#105)
For #97
1 parent 84a9500 commit 059a726

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

UnicodeJsps/src/main/java/org/unicode/jsp/ICUPropertyFactory.java

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ protected ICUProperty(String propName, int propEnum) {
5858
|| propEnum == UProperty.EMOJI_MODIFIER
5959
|| propEnum == UProperty.EMOJI_MODIFIER_BASE
6060
|| propEnum == UProperty.EMOJI_PRESENTATION
61+
|| propEnum == UProperty.EXTENDED_PICTOGRAPHIC
6162
) {
6263
setUniformUnassigned(false);
6364
}
@@ -144,7 +145,7 @@ private String getFixedValueAlias(int propId, String valueAlias, int valueEnum,
144145
valueEnum = fixedGetPropertyValueEnum(propId,valueAlias);
145146
}
146147
// because these are defined badly, there may be no normal (long) name.
147-
// if there is
148+
// if there is
148149
String result = fixedGetPropertyValueName(propId, valueEnum, nameChoice);
149150
if (result != null) return result;
150151
// HACK try other namechoice
@@ -158,7 +159,7 @@ private String getFixedValueAlias(int propId, String valueAlias, int valueEnum,
158159
}
159160

160161
public boolean isCombiningClassProperty() {
161-
return (propEnum == UProperty.CANONICAL_COMBINING_CLASS
162+
return (propEnum == UProperty.CANONICAL_COMBINING_CLASS
162163
|| propEnum == UProperty.LEAD_CANONICAL_COMBINING_CLASS
163164
|| propEnum == UProperty.TRAIL_CANONICAL_COMBINING_CLASS
164165
);
@@ -188,7 +189,7 @@ private static String fixedGetPropertyValueName(int propEnum, int valueEnum, int
188189
newValue = regularize(newValue, true);
189190
if (propEnum == UProperty.BLOCK && newValue.equals("Sutton_Sign_Writing")) {
190191
newValue = "Sutton_SignWriting";
191-
}
192+
}
192193
fixSkeleton.put(value, newValue);
193194
}
194195
return newValue;
@@ -197,7 +198,7 @@ private static String fixedGetPropertyValueName(int propEnum, int valueEnum, int
197198
public List _getNameAliases(List result) {
198199
if (result == null) result = new ArrayList();
199200
// String alias = String_Extras.get(propEnum);
200-
// if (alias == null)
201+
// if (alias == null)
201202
String alias = Binary_Extras.get(propEnum);
202203
if (alias != null) {
203204
addUnique(alias, result);
@@ -232,7 +233,7 @@ public String getFixedPropertyName(int propName, int nameChoice) {
232233
}
233234
}
234235
}
235-
236+
236237
public UnicodeSet getSet(PatternMatcher matcher, UnicodeSet result) {
237238
result = super.getSet(matcher, result);
238239
if (propEnum == UProperty.GENERAL_CATEGORY) {
@@ -246,7 +247,7 @@ public UnicodeSet getSet(PatternMatcher matcher, UnicodeSet result) {
246247
return result;
247248
}
248249

249-
250+
250251
static Map<String,R2<String,UnicodeSet>> SPECIAL_GC = new LinkedHashMap<String,R2<String,UnicodeSet>>();
251252
static {
252253
String[][] extras = {
@@ -263,7 +264,7 @@ public UnicodeSet getSet(PatternMatcher matcher, UnicodeSet result) {
263264
SPECIAL_GC.put(extra[0], (R2<String, UnicodeSet>) Row.of(extra[1], new UnicodeSet(extra[2]).freeze()).freeze());
264265
}
265266
}
266-
267+
267268
public List _getAvailableValues(List result) {
268269
if (result == null) result = new ArrayList();
269270
if (propEnum == UProperty.AGE) {
@@ -364,23 +365,23 @@ private void addAliases(int propId, String valueAlias, List result) {
364365
*/
365366
private int internalGetPropertyType(int prop) {
366367
switch(prop) {
367-
case UProperty.AGE:
368-
case UProperty.BLOCK:
369-
case UProperty.SCRIPT:
368+
case UProperty.AGE:
369+
case UProperty.BLOCK:
370+
case UProperty.SCRIPT:
370371
return UnicodeProperty.CATALOG;
371372
case UProperty.ISO_COMMENT:
372373
case UProperty.NAME:
373-
case UProperty.UNICODE_1_NAME:
374+
case UProperty.UNICODE_1_NAME:
374375
return UnicodeProperty.MISC;
375376
case UProperty.BIDI_MIRRORING_GLYPH:
376377
case UProperty.CASE_FOLDING:
377378
case UProperty.LOWERCASE_MAPPING:
378-
case UProperty.SIMPLE_CASE_FOLDING:
379+
case UProperty.SIMPLE_CASE_FOLDING:
379380
case UProperty.SIMPLE_LOWERCASE_MAPPING:
380-
case UProperty.SIMPLE_TITLECASE_MAPPING:
381+
case UProperty.SIMPLE_TITLECASE_MAPPING:
381382
case UProperty.SIMPLE_UPPERCASE_MAPPING:
382-
case UProperty.TITLECASE_MAPPING:
383-
case UProperty.UPPERCASE_MAPPING:
383+
case UProperty.TITLECASE_MAPPING:
384+
case UProperty.UPPERCASE_MAPPING:
384385
return UnicodeProperty.EXTENDED_STRING;
385386
}
386387
if (prop < UProperty.BINARY_START) return UnicodeProperty.UNKNOWN;
@@ -518,7 +519,7 @@ public UnicodeProperty getInternalProperty(String propertyAlias) {
518519
/* (non-Javadoc)
519520
* @see com.ibm.icu.dev.util.UnicodePropertySource#getProperty(java.lang.String)
520521
*/
521-
// TODO file bug on getPropertyValueName for Canonical_Combining_Class
522+
// TODO file bug on getPropertyValueName for Canonical_Combining_Class
522523

523524
public static class Names {
524525
private String[] names;

0 commit comments

Comments
 (0)