8206879: Currency decimal marker incorrect for Peru
Reviewed-by: naoto, rpatil
This commit is contained in:
parent
cd9e3c1b13
commit
a0a09f03e4
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -63,6 +63,21 @@ public class FormatData_es_PE extends ParallelListResourceBundle {
|
||||
"hh:mm a", // short time pattern
|
||||
}
|
||||
},
|
||||
{ "NumberElements",
|
||||
new String[] {
|
||||
".", // decimal separator
|
||||
",", // group (thousands) separator
|
||||
";", // list separator
|
||||
"%", // percent sign
|
||||
"0", // native 0 digit
|
||||
"#", // pattern digit
|
||||
"-", // minus sign
|
||||
"E", // exponential
|
||||
"\u2030", // per mille
|
||||
"\u221e", // infinity
|
||||
"\ufffd" // NaN
|
||||
}
|
||||
},
|
||||
{ "DatePatterns",
|
||||
new String[] {
|
||||
"EEEE d' de 'MMMM' de 'yyyy", // full date pattern
|
||||
|
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @bug 8206879
|
||||
* @summary Currency decimal marker incorrect for Peru.
|
||||
* @modules jdk.localedata
|
||||
* @run main/othervm -Djava.locale.providers=JRE TestPeruCurrencyFormat
|
||||
*/
|
||||
|
||||
import java.text.NumberFormat;
|
||||
import java.util.Locale;
|
||||
|
||||
public class TestPeruCurrencyFormat {
|
||||
|
||||
public static void main(String[] args) {
|
||||
final String expected = "S/.1,234.56";
|
||||
NumberFormat currencyFmt =
|
||||
NumberFormat.getCurrencyInstance(new Locale("es", "PE"));
|
||||
String s = currencyFmt.format(1234.56);
|
||||
|
||||
if (!s.equals(expected)) {
|
||||
throw new RuntimeException("Currency format for Peru failed, expected " + expected + ", got " + s);
|
||||
}
|
||||
}
|
||||
}
|
@ -614,8 +614,6 @@ FormatData/es_PE/DatePatterns/1=d' de 'MMMM' de 'yyyy
|
||||
FormatData/es_PE/DatePatterns/2=dd/MM/yyyy
|
||||
FormatData/es_PE/DatePatterns/3=dd/MM/yy
|
||||
FormatData/es_PE/DateTimePatterns/0={1} {0}
|
||||
FormatData/es_PE/NumberElements/0=,
|
||||
FormatData/es_PE/NumberElements/1=.
|
||||
FormatData/es_PE/NumberElements/2=;
|
||||
FormatData/es_PR/NumberPatterns/0=#,##0.###;-#,##0.###
|
||||
# FormatData/es_PR/NumberPatterns/1=$#,##0.00;($#,##0.00) # Changed; see bug 4122840
|
||||
@ -8323,3 +8321,8 @@ CurrencyNames//mru=Mauritanian Ouguiya
|
||||
|
||||
# bug #8208746
|
||||
CurrencyNames//ves=Venezuelan Bol\u00edvar Soberano
|
||||
|
||||
# bug# 8206879
|
||||
# For Peru decimal separator is changed to dot(.) and grouping separator is changed to comma(,)
|
||||
FormatData/es_PE/NumberElements/0=.
|
||||
FormatData/es_PE/NumberElements/1=,
|
||||
|
Loading…
Reference in New Issue
Block a user