Skip to content

Commit 7b727f4

Browse files
committed
Fix Age derivation
1 parent 62f8708 commit 7b727f4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

unicodetools/src/main/java/org/unicode/text/UCD/ToolUnicodePropertySource.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2241,6 +2241,15 @@ public String getAge(int codePoint) {
22412241
break;
22422242
}
22432243
if (ucdCache[i].isAllocated(codePoint)) {
2244+
if (i == UCD_Types.AGE11 && !ucdCache[i + 1].isAllocated(codePoint)) {
2245+
// Deallocations in Unicode 2.
2246+
continue;
2247+
}
2248+
return UCD_Names.LONG_AGE[i];
2249+
} else if (i == UCD_Types.AGE11
2250+
&& ((codePoint >= 0xE000 && codePoint <= 0xF8FF)
2251+
|| (codePoint >= 0xF900 && codePoint <= 0xFA2D))) {
2252+
// Private use and CJK compatibility ideographs, not overt in UnicodeData 1.1.5.
22442253
return UCD_Names.LONG_AGE[i];
22452254
}
22462255
}

0 commit comments

Comments
 (0)