BCP 47: duplicate U extension keywords are rejected as invalid by ICU4C. ICU4J is fine with it

Description

Spun off from Ecma 402 bug 262 , ICU4J does allows duplicate keywords in U-extension of BCP 47 per RFC 6067 while ICU4C does not.

1 2 3 4 5 6 public class DuplicateUnicodeKeyword { public static void main(String[] args) { var loc = com.ibm.icu.util.ULocale.forLanguageTag("en-u-kf-true-kf-false"); System.out.println(loc.toLanguageTag()); // Prints "en-u-kf-true" } }

ICU4C's behavior should match ICU4J's. Note that RFC 6067 does allow duplicate keywords. The second or later one is ignored, while the first one is honored.

I can work on this.

Status

Assignee

Yoshito Umaoka

Reporter

Jungshik Shin

Labels

Reviewer

None

Time Needed

None

Start date

None

Components

Fix versions

Priority

medium