提交 4485f040 编写于 作者: D dkejriwal

8206879: Currency decimal marker incorrect for Peru

Reviewed-by: naoto, rpatil
上级 eb558539
/*
* 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
......
/*
* 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
......@@ -8307,3 +8305,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=,
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册