On Tue, 3 Nov 2026 17:37:37 GMT, Naoto Sato <[email protected]> wrote:

> Updates the JDK to support Unicode 18.0.0. This change also incorporates the 
> relevant ICU4J 79.1 updates for bidirectional text processing and 
> normalization (JDK-8372369). The corresponding CSR has also been drafted.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

make/jdk/src/classes/build/tools/generatecharacter/GenerateCaseFolding.java 
line 93:

> 91:         int cp = Integer.parseInt(folding[0], 16);
> 92:         long value = (long)Integer.parseInt(folding[1], 16);
> 93:         if (!Character.isSupplementaryCodePoint(cp) && folding.length != 
> 2) {

nit: could remove `cp` now.

make/jdk/src/classes/build/tools/generatecharacter/SpecialCaseMap.java line 64:

> 62:             SpecialCaseMap item = parse(line.trim());
> 63:             if (item != null &&
> 64:                 item.getCharSource() >> 16 == plane) {

I presume it is intentional that we no longer end early when the item's plane 
is greater than the passed plane? Is it worth describing the expectations in 
the method javadoc? i.e., the items in the file are no longer ordered by plane.

src/java.base/share/classes/java/lang/Character.java line 12424:

> 12422:      * mapping information from the SpecialCasing file in the Unicode
> 12423:      * specification. If a character has no explicit uppercase
> 12424:      * mapping, then the {@code char} itself is returned in the

I think `{@code char}` is technically incorrect here, since the input can be a 
supplementary code point now.

src/java.base/share/classes/java/lang/StringLatin1.java line 400:

> 398:                 if (cf1 != cf2 ||
> 399:                     // Special case for Sharp-S
> 400:                     cp1 == 0x00DF) {

Instead of hard-coding against "Sharp-S", can check the chars on `cp2` to see 
if it is not `1`? If that works, it would support future Unicode update 
additions that share this same behavior better.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/33705#discussion_r4471586443
PR Review Comment: https://git.openjdk.org/jdk/pull/33705#discussion_r4471644940
PR Review Comment: https://git.openjdk.org/jdk/pull/33705#discussion_r4471714198
PR Review Comment: https://git.openjdk.org/jdk/pull/33705#discussion_r4471885140

Reply via email to