Skip to content

Commit 3d42b4d

Browse files
authored
Do not fall back when looking for 4.1 data or later (#1089)
* Do not fall back when looking for 4.1 data or later * spots
1 parent 3743816 commit 3d42b4d

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

unicodetools/src/main/java/org/unicode/text/utility/Utility.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,6 +1451,14 @@ public static String getMostRecentUnicodeDataFile(
14511451
if (version != null && version.compareTo(currentVersion) < compValue) {
14521452
continue;
14531453
}
1454+
if (version != null
1455+
&& version.compareTo(VersionInfo.UNICODE_4_1) >= 0
1456+
&& currentVersion.compareTo(version) < 0) {
1457+
// Do not look at earlier versions if we want Unicode 4.1 data or later.
1458+
// Unicode 4.0.1 is the last version for which unmodified files were not
1459+
// republished.
1460+
return null;
1461+
}
14541462
// check the standard ucd directory
14551463
if (filename.contains("/*/")) {
14561464
// check the idna directory

unicodetools/src/main/resources/org/unicode/text/UCD/UnicodeInvariantTest.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,6 +1311,10 @@ Let $japaneseSimplifiedRadicals := \p{Name=/CJK RADICAL J-SIMPLIFIED/}
13111311
In $chineseSimplifiedRadicals, Equivalent_Unified_Ideograph ∈ [\p{kRSUnicode=/^[0-9]+'\.0$/} $radicalsWithUnifiableSimplifications]
13121312
In $japaneseSimplifiedRadicals, Equivalent_Unified_Ideograph ∈ \p{kRSUnicode=/^[0-9]+''\.0$/}
13131313

1314+
# Check that removed properties do not persist.
1315+
\p{U16:kGB7≠@none@}=[垯屃慭梾疭瘆筼臜荙诐跶轪辌酦镈镋镕饳馉鱽鱾鲃鲉鲌鲏鲪鲬鲯鲹鲾鳂鳈鳉鳑鳚鳡鳤鸻鸼鹟鹮鹲]
1316+
\p{kGB7≠@none@}=[]
1317+
13141318
# Tangut invariants
13151319

13161320
Let $tangutSourcesScope := [\p{Block=/^Tangut(.Supplement)?$/} - \p{gc=Cn}]

0 commit comments

Comments
 (0)