-
Bug
-
Resolution: Unresolved
-
P4
-
9
-
generic
-
generic
Sample code snippet:
public static void main(String[] args){
List<String> langList = new ArrayList<String>();
langList.add("de-DE");
langList.add("de-DE-u-nu-deva");
for(String langTag: langList) {
Locale locale = Locale.forLanguageTag(langTag);
DecimalFormatSymbols dfs = DecimalFormatSymbols.getInstance(locale);
Character decimal = Character.valueOf(dfs.getDecimalSeparator());
Character group = Character.valueOf(dfs.getGroupingSeparator());
System.out.println("locale: " + langTag + " decimal: [" + decimal + "] group: [" + group + "]");
}
}
For de-DE-u-nu-deva, there is no number system defined for "deva" in de-DE and de, my understanding is it should fallback to 'latn' in de, and have the same output with de-DE, but it seems not.
Locale de-DE-u-nu-deva is an example, it also failed on other locales when number system specified by 'nu' does not exist in the corresponding CLDR xml.
CLDR spec:
<symbols numberSystem="deva">
<alias source="locale" path="../symbols[@numberSystem='latn']"/>
</symbols>
de.xml:
<symbols numberSystem="latn">
<decimal>,</decimal>
<group>.</group>
...
</symbols>
Expected:
locale: de-DE decimal: [,] group: [.]
locale: de-DE-u-nu-deva decimal: [,] group: [.]
Output:
locale: de-DE decimal: [,] group: [.]
locale: de-DE-u-nu-deva decimal: [.] group: [,]
public static void main(String[] args){
List<String> langList = new ArrayList<String>();
langList.add("de-DE");
langList.add("de-DE-u-nu-deva");
for(String langTag: langList) {
Locale locale = Locale.forLanguageTag(langTag);
DecimalFormatSymbols dfs = DecimalFormatSymbols.getInstance(locale);
Character decimal = Character.valueOf(dfs.getDecimalSeparator());
Character group = Character.valueOf(dfs.getGroupingSeparator());
System.out.println("locale: " + langTag + " decimal: [" + decimal + "] group: [" + group + "]");
}
}
For de-DE-u-nu-deva, there is no number system defined for "deva" in de-DE and de, my understanding is it should fallback to 'latn' in de, and have the same output with de-DE, but it seems not.
Locale de-DE-u-nu-deva is an example, it also failed on other locales when number system specified by 'nu' does not exist in the corresponding CLDR xml.
CLDR spec:
<symbols numberSystem="deva">
<alias source="locale" path="../symbols[@numberSystem='latn']"/>
</symbols>
de.xml:
<symbols numberSystem="latn">
<decimal>,</decimal>
<group>.</group>
...
</symbols>
Expected:
locale: de-DE decimal: [,] group: [.]
locale: de-DE-u-nu-deva decimal: [,] group: [.]
Output:
locale: de-DE decimal: [,] group: [.]
locale: de-DE-u-nu-deva decimal: [.] group: [,]