From 44cf51fae939a016ebd718b90f5f640458174e0d Mon Sep 17 00:00:00 2001 From: Naoto Sato Date: Mon, 7 Jul 2025 11:58:45 -0700 Subject: [PATCH 1/2] initial commit --- src/java.base/share/classes/java/lang/Character.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/java.base/share/classes/java/lang/Character.java b/src/java.base/share/classes/java/lang/Character.java index a439a90761d48..72ff33651f961 100644 --- a/src/java.base/share/classes/java/lang/Character.java +++ b/src/java.base/share/classes/java/lang/Character.java @@ -117,11 +117,9 @@ * fixed-width 16-bit entities. The Unicode Standard has since been * changed to allow for characters whose representation requires more * than 16 bits. The range of legal code points is now - * U+0000 to U+10FFFF, known as Unicode scalar value. - * (Refer to the - * definition of the U+n notation in the Unicode - * Standard.) + * U+0000 to U+10FFFF, known as + * + * Unicode scalar value. * *

The set of characters from U+0000 to U+FFFF is * sometimes referred to as the Basic Multilingual Plane (BMP). @@ -173,7 +171,7 @@ * use instances for synchronization, or unpredictable behavior may * occur. For example, in a future release, synchronization may fail. * - * @spec https://www.unicode.org/reports/tr27 Unicode 3.1.0 + * @spec https://www.unicode.org/reports/tr44 Unicode Character Database * @author Lee Boynton * @author Guy Steele * @author Akira Tanaka From 69089cbc064c09ee5021560847975f4d2d9568a4 Mon Sep 17 00:00:00 2001 From: Naoto Sato Date: Mon, 7 Jul 2025 13:19:14 -0700 Subject: [PATCH 2/2] Some more Unicode related spec clean up --- src/java.base/share/classes/java/util/Locale.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/java.base/share/classes/java/util/Locale.java b/src/java.base/share/classes/java/util/Locale.java index 9059d1968612b..eb69d1dfc2f8f 100644 --- a/src/java.base/share/classes/java/util/Locale.java +++ b/src/java.base/share/classes/java/util/Locale.java @@ -561,8 +561,8 @@ * RFC 4647: Matching of Language Tags * @spec https://www.rfc-editor.org/info/rfc5646 * RFC 5646: Tags for Identifying Languages - * @spec https://unicode.org/reports/tr35/ - * Unicode Locale Data Markup Language + * @spec https://www.unicode.org/reports/tr35 + * Unicode Locale Data Markup Language (LDML) * @see Builder * @see ResourceBundle * @see java.text.Format @@ -1687,14 +1687,14 @@ private String computeLanguageTag() { * {@return a case folded IETF BCP 47 language tag} * *

This method formats a language tag into one with case convention - * that adheres to section 2.1.1. Formatting of Language Tags of RFC5646. + * that adheres to section 2.1.1. Formatting of Language Tags of RFC 5646. * This format is defined as: All subtags, including extension and private * use subtags, use lowercase letters with two exceptions: two-letter * and four-letter subtags that neither appear at the start of the tag * nor occur after singletons. Such two-letter subtags are all * uppercase (as in the tags "en-CA-x-ca" or "sgn-BE-FR") and four- * letter subtags are titlecase (as in the tag "az-Latn-x-latn"). As - * legacy tags, (defined as "grandfathered" in RFC5646) are not always well-formed, this method + * legacy tags, (defined as "grandfathered" in RFC 5646) are not always well-formed, this method * will simply case fold a legacy tag to match the exact case convention * for the particular tag specified in the respective * {@link ##legacy_tags Legacy tags} table. @@ -1720,15 +1720,15 @@ private String computeLanguageTag() { *

As the formatting of the case convention is dependent on the * positioning of certain subtags, callers of this method should ensure * that the language tag is well-formed, (conforming to section 2.1. Syntax - * of RFC5646). + * of RFC 5646). * * @param languageTag the IETF BCP 47 language tag. * @throws IllformedLocaleException if {@code languageTag} is not well-formed * @throws NullPointerException if {@code languageTag} is {@code null} * @spec https://www.rfc-editor.org/rfc/rfc5646.html#section-2.1 - * RFC5646 2.1. Syntax + * RFC 5646: 2.1. Syntax * @spec https://www.rfc-editor.org/rfc/rfc5646#section-2.1.1 - * RFC5646 2.1.1. Formatting of Language Tags + * RFC 5646: 2.1.1. Formatting of Language Tags * @since 21 */ public static String caseFoldLanguageTag(String languageTag) {