Skip to content

Commit 57c1df1

Browse files
pedberg-icuAEApple
authored andcommitted
CLDR-18869 Use latest (Aug 5) version of ICU4J, update tests/code (unicode-org#4932)
1 parent 0900aee commit 57c1df1

File tree

7 files changed

+32
-26
lines changed

7 files changed

+32
-26
lines changed

tools/cldr-code/src/main/java/org/unicode/cldr/util/Quoter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public abstract class Quoter {
1313
private static boolean DEBUG = false;
1414

1515
protected boolean quoting = false;
16-
protected StringBuffer output = new StringBuffer();
16+
protected StringBuilder output = new StringBuilder();
1717

1818
public void setQuoting(boolean value) {
1919
quoting = value;
@@ -50,7 +50,7 @@ public String toString() {
5050

5151
/** Implements standard ICU rule quoting */
5252
public static class RuleQuoter extends Quoter {
53-
private StringBuffer quoteBuffer = new StringBuffer();
53+
private StringBuilder quoteBuffer = new StringBuilder();
5454

5555
@Override
5656
public void setQuoting(boolean value) {

tools/cldr-code/src/test/java/org/unicode/cldr/unittest/LanguageTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ public void TestScriptsWithoutLanguage() {
159159
Set<String> needTransfer = new LinkedHashSet<>();
160160
Set<String> unicodeScripts = getUnicodeScripts();
161161
for (String script : unicodeScripts) {
162+
if (script.equals("Chis")) {
163+
logKnownIssue("ICU-23038", "ICU4J UScript still supports CHISOI");
164+
continue;
165+
}
162166
String likely = likelyMap.get("und_" + script);
163167
if (likely == null) {
164168
final String data = script2likely.get(script);

tools/cldr-code/src/test/java/org/unicode/cldr/unittest/LikelySubtagsTest.java

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -310,13 +310,17 @@ public void TestForMissingScriptMetadata() {
310310
int ch = current.charAt(0);
311311
int script = UScript.getScript(ch);
312312
String shortName = UScript.getShortName(script);
313-
Info i = ScriptMetadata.getInfo(shortName);
314-
if (i == null) {
315-
errln("Script Metadata is missing: " + shortName);
316-
continue;
317-
}
318-
if (i.likelyLanguage.equals("und") && !exceptions.contains(shortName)) {
319-
errln("Script has no likely language: " + shortName);
313+
if (shortName.equals("Chis")) {
314+
logKnownIssue("ICU-23038", "ICU4J UScript still supports CHISOI");
315+
} else {
316+
Info i = ScriptMetadata.getInfo(shortName);
317+
if (i == null) {
318+
errln("Script Metadata is missing: " + shortName);
319+
continue;
320+
}
321+
if (i.likelyLanguage.equals("und") && !exceptions.contains(shortName)) {
322+
errln("Script has no likely language: " + shortName);
323+
}
320324
}
321325
toRemove.applyIntPropertyValue(UProperty.SCRIPT, script);
322326
current.removeAll(toRemove);

tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestDataTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ private void checkPersonNameTests(Path filePath) {
9696
return;
9797
}
9898
String localeId = name.substring(0, name.length() - 4);
99+
if (localeId.equals("km")) {
100+
logKnownIssue(
101+
"CLDR-18870",
102+
"With ICU4J 2025-08-05, testData/personNameTest/km.txt needs updating");
103+
return;
104+
}
99105
final PersonNameData pnd = new PersonNameData();
100106
pnd.pnf = new PersonNameFormatter(FACTORY.make(localeId, true));
101107
pnd.localeId = localeId;

tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestScriptMetadata.java

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,13 @@ public void TestScripts() {
113113
for (int i = UScript.COMMON; i < UScript.CODE_LIMIT; ++i) {
114114
String longName = UScript.getName(i);
115115
String shortName = UScript.getShortName(i);
116+
if (shortName.equals("Chis")) {
117+
logKnownIssue("ICU-23038", "ICU4J UScript still supports CHISOI");
118+
continue;
119+
}
116120
Info info = ScriptMetadata.getInfo(i);
117121
if (info != null) {
118122
map.put(info.idUsage, longName + "\t(" + shortName + ")\t" + info);
119-
} else if (shortName.equals("Chis")) {
120-
// pass:
121-
// UTC #184 moved Chisoi from Unicode 17 to Unicode 18
122-
// but as of 20250728 CLDR still depends on a version of ICU that
123-
// includes UScript.CHISOI.
124-
// Its numeric value will be reused for a different script.
125-
// TODO: Remove this hack after CLDR has been updated to ICU 78 final.
126123
} else {
127124
// There are many script codes that are not "real"; there are no
128125
// Unicode characters for them.
@@ -172,15 +169,6 @@ public void TestShowLanguages() {
172169
Set<String> bads = new TreeSet<>();
173170
UnicodeSet temp = new UnicodeSet();
174171
for (String s : getScriptsToShow(sc, english)) {
175-
if (s.equals("Chis")) {
176-
// pass:
177-
// UTC #184 moved Chisoi from Unicode 17 to Unicode 18
178-
// but as of 20250728 CLDR still depends on a version of ICU that
179-
// includes UScript.CHISOI.
180-
// Its numeric value will be reused for a different script.
181-
// TODO: Remove this hack after CLDR has been updated to ICU 78 final.
182-
continue;
183-
}
184172
if (ScriptMetadata.getInfo(s) == null) {
185173
// There are many script codes that are not "real"; there are no
186174
// Unicode characters for them.

tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestSupplementalInfo.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2118,6 +2118,10 @@ public void TestNumberingSystemDigitCompleteness() {
21182118
List<Integer> unicodeDigits = new ArrayList<>();
21192119
for (int cp = UCharacter.MIN_CODE_POINT; cp <= UCharacter.MAX_CODE_POINT; cp++) {
21202120
if (UCharacter.getType(cp) == UCharacterEnums.ECharacterCategory.DECIMAL_DIGIT_NUMBER) {
2121+
if (UScript.getShortName(UScript.getScript(cp)).equals("Chis")) {
2122+
logKnownIssue("ICU-23038", "ICU4J UCharacter still supports CHISOI");
2123+
continue;
2124+
}
21212125
unicodeDigits.add(cp);
21222126
}
21232127
}

tools/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
release candidate and changes to a version like nn.1-SNAPSHOT, we should just use
2626
that so we are always getting the latest version pushed (and should not have CLDR
2727
compatibility issues at that point). -->
28-
<icu4j.version>78.0.1-20250521.091503-4</icu4j.version> <!-- before ICU rc, specific dated version -->
28+
<icu4j.version>78.0.1-20250805.181531-5</icu4j.version> <!-- before ICU rc, specific dated version -->
2929
<!--<icu4j.version>78.1-SNAPSHOT</icu4j.version>--> <!-- after ICU rc, latest published version -->
3030
<junit.jupiter.version>5.8.2</junit.jupiter.version>
3131
<maven-surefire-plugin-version>3.3.1</maven-surefire-plugin-version>

0 commit comments

Comments
 (0)