Skip to content

Commit 39874e1

Browse files
authored
Fix [:C:] getting interpreted as the entire code space (#1076)
* Other=ISO_Comment * c * spots
1 parent 83971c4 commit 39874e1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

unicodetools/src/main/java/org/unicode/props/UnicodeProperty.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,6 +1001,14 @@ private class MyXSymbolTable extends UnicodeSet.XSymbolTable {
10011001
@Override
10021002
public boolean applyPropertyAlias(
10031003
String propertyName, String propertyValue, UnicodeSet result) {
1004+
if ((propertyName.equals("C") || propertyName.equals("c"))
1005+
&& propertyValue.isEmpty()) {
1006+
// C matches isc=ISO_Comment, and we are not able to distinguish
1007+
// \p{C} (=\p{General_Category=Other}) from \p{C=} (=\p{ISO_Comment=}) here.
1008+
// Fall back to ICU, since this symbol table does not implement GC groupings.
1009+
// TODO(egg): This symbol table needs to go, see #1073, #1074.
1010+
return false;
1011+
}
10041012
if (false) System.out.println(propertyName + "=" + propertyValue);
10051013
UnicodeProperty prop = getProperty(propertyName);
10061014
if (prop == null) return false;

0 commit comments

Comments
 (0)