<i18n dev> RFR: 8308108: Support Unicode extension for collation settings [v3]

Alan Bateman alanb at openjdk.org
Fri May 19 08:02:49 UTC 2023

On Thu, 18 May 2023 19:44:01 GMT, Naoto Sato <naoto at openjdk.org> wrote:

>> This change intends to interpret the BCP47 U extension wrt collation settings in the given `Locale`, then applies them to the created instances in the 1-arg factory method in `Collator`. A corresponding CSR has also been drafted.
> Naoto Sato has updated the pull request incrementally with one additional commit since the last revision:
>   Added a table for possible BCP47 values and their mappings

src/java.base/share/classes/java/text/Collator.java line 264:

> 262:      * </table>
> 263:      * If the specified setting value is not recognized, strength and/or
> 264:      * decomposition will not be overridden.

The proposed update looks okay except for the last part "If the specified setting value is not recognized, strength and/or decomposition will not be overridden". I thin this could be clearer.
If I understand correctly, if the Unicode locale type for the given Locale might have a strength level and decomposition mode and this method makes a best effort to return a Collator with the expected level and mode. If so, then I think the javadoc needs to make this a bit clearer. Also, if the factory method returns a Collator that doesn't do what I asked, can I call setStrength/setDecomposition to change it?


PR Review Comment: https://git.openjdk.org/jdk/pull/14040#discussion_r1198665295

More information about the i18n-dev mailing list