-
Bug
-
Resolution: Fixed
-
P3
-
8, 9
-
None
-
b15
-
generic
-
generic
-
Verified
Currently the returned language tag(s) from those methods are all in lower case letters. Although language tags/subtags are case inensitive, instead of converting the matching language tag(s) to lowercase, these methods should preserve the case of input language tag(s)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Execute the code below
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public static void main(String[] args) {
List<LanguageRange> priorityList = LanguageRange.parse("*-CH");
List<String> matchingTags = Locale.filterTags(priorityList, List.of("de-CH", "hi-in", "En-GB"),
FilteringMode.AUTOSELECT_FILTERING);
System.out.println(matchingTags);
}
---------- END SOURCE ----------
EXPECTED: "de-CH"
FOUND: "de-ch"
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Execute the code below
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public static void main(String[] args) {
List<LanguageRange> priorityList = LanguageRange.parse("*-CH");
List<String> matchingTags = Locale.filterTags(priorityList, List.of("de-CH", "hi-in", "En-GB"),
FilteringMode.AUTOSELECT_FILTERING);
System.out.println(matchingTags);
}
---------- END SOURCE ----------
EXPECTED: "de-CH"
FOUND: "de-ch"
- csr for
-
JDK-8181073 Locale.filterTags()/lookupTag() methods return lowercased language tags
-
- Closed
-
- duplicates
-
JDK-8170889 LocaleMatcher case conversion issues
-
- Closed
-
- relates to
-
JDK-8175539 Duplicate matching tags returned by Locale.filterTags() for LanguageRange("*")
-
- Closed
-
-
JDK-8159337 Introduce a method in Locale class to return the language tags as per RFC 5646 convention
-
- Resolved
-