JDK-4461740 : Java locales at 1.1.8_13 dealing with international currency symbols
  • Type: Bug
  • Component: globalization
  • Sub-Component: translation
  • Affected Version: 1.1.8_13
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_2.6
  • CPU: generic
  • Submitted: 2001-05-22
  • Updated: 2004-04-01
  • Resolved: 2004-03-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 b42Fixed
Related Reports
Relates :  
Description
All problems and questions relate to JDK 1.1.8_13 on Solaris 2.6.
These problems do NOT relate to Solaris locales -- they relate to Java locales.

Problem #1:
	Austria locale (de_AT) has incorrect local currency symbol.  It is "oS"
	(with the "o" having an umlaut), but should be "ATS".

	Current behavior: oS 1.234,56
	Desired behavior: ATS 1.234,56

	(NOTE: "ATS" is indeed the international currency symbol already, but
	we're asking that the local currency symbol also be "ATS".)

Problem #2:
	Austria locale (de_AT) reports currency off by a factor of 100.  For
	example, Solaris 2.6 reports a value of...

		ATS 9.000,00

	...but JDK 1.1.8 reports a value of...

		oS 900.000,00

Problem #3:
	Sweden locale (sv_SE) uses a "non-breaking space" in the thousands
	separator.  It should be a decimal point.

	Current behavior: -1 234,56 kr
	Desired behavior: -1.234,56 kr

Problem #4:
	Argentina locale (es_AR) does not display negative local currency
	amounts correctly.

	Current behavior: ($1.234,56)
	Desired behavior: -$1.234,56

Problem #5:
	Mexico locale (es_MX) does not display negative local currency amounts
	correctly.

	Current behavior: ($1,234.56)
	Desired behavior: -$1,234.56

Problem #6:
	Netherlands locale (nl_NL) has wrong local currency symbol.

	Current behavior: fl 1.234,56-
	Desired behavior: f 1.234,56-

Problem #7:
	Latin American locales have wrong behavior for U.S. dollar
	international currency symbol.  Not sure is this is a problem with the
	Latin American locales or the U.S. locale.  Not sure if this is a bug
	or an RFE (request for enhancement).

	Desired behaviors:
		Argentina (es_AR): -U$S 1.234,56
		   Brazil (pt_BR): -US$ 1.234,56
		   Mexico (es_MX): -US$ 1.234,56

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-beta2 FIXED IN: tiger-beta2 INTEGRATED IN: tiger-b42 tiger-beta2 VERIFIED IN: tiger-beta2
14-06-2004

EVALUATION Problems #1 and #6 will disappear on 1/1/2002, when Austria and the Netherlands switch to the euro as their legal currency. Problems #2 and #7 can't be reproduced from the description - we need a test case to see which values are passed in to which NumberFormat methods. Problems #3, #4, and #5 need to be evaluated by the localization team. Here's a tentative test case, but it's unsufficient to evaluate #2 and #7: import java.text.NumberFormat; import java.util.Locale; public class Bug4461740 { public static void main(String[] args) { test("#1: ", 1234.56, new Locale("de", "AT")); test("#2: ", 900000., new Locale("de", "AT")); test("#3: ", -1234.56, new Locale("sv", "SE")); test("#4: ", -1234.56, new Locale("es", "AR")); test("#5: ", -1234.56, new Locale("es", "MX")); test("#6: ", -1234.56, new Locale("nl", "NL")); test("#7a: ", -1234.56, new Locale("es", "AR")); test("#7b: ", -1234.56, new Locale("pt", "BR")); test("#7c: ", -1234.56, new Locale("es", "MX")); } private static void test(String id, double value, Locale locale) { NumberFormat format = NumberFormat.getCurrencyInstance(locale); System.out.println(id + format.format(value)); } } The output is identical for J2RE 1.1.8, 1.2, and 1.4 beta 3: #1: ��S 1.234,56 #2: ��S 900.000,00 #3: -1��234,56 kr #4: ($1.234,56) #5: ($1,234.56) #6: fl 1.234,56- #7a: ($1.234,56) #7b: -R$ 1.234,56 #7c: ($1,234.56) ###@###.### 2001-11-29 Please check whether the problems are reproducible in mantis/tiger. thanks! ###@###.### 2003-07-28 ###@###.### 2003-09-17 Problems #1 and #6 are no longer an issue as mentioned above. Problem #2 isn't off by a factor of 100. The thousands separator in austria is '.' and the decimal point is ',', so 900,000.00 in "english" would be 900.000,00 in de_AT. (i.e. "900.000" and automatically adding two places of decimals) Problem #3 seems to be that sv_SE is using the same format for currency that it's using for numbers. I'll see which is right. Problems #4 and #5 are caused by es_MX and es_AR just using the parent "es" format for negative numbers rather than their own. This is part of the problem for #7 as well. The brazilian part of #7 is becasue the currency for brazil is set as the real, not the dollar. Am trying to check to see is this still the case. Am getting a headache here trying to compare curency formats across windows, solaris, java and ICU here. Will fix the above tomorrow. ###@###.### 2003-09-18 ******** l10n evaluation template - begin *********** Evaluation : Matching the argentinian, mexican, brazilian and swedish currency formats with the soalris & winXP locale settings. sccsdiff info (e.g. sccs diffs -r1.30 1.31 Activator_fr.java): ------- LocaleElements_es_AR.java ------- 37c37,45 < {"ARS", "$"} --- > {"ARS", "$"}, > {"USD", "US$"} > } > }, > { "NumberPatterns", > new String[] { > "#,##0.###;-#,##0.###", // decimal pattern > "\u00A4#,##0.00;\u00A4-#,##0.00", // currency pattern > "#,##0%" // percent pattern ------- LocaleElements_es_MX.java ------- 49a50,56 > { "NumberPatterns", > new String[] { > "#,##0.###;-#,##0.###", // decimal pattern > "\u00A4#,##0.00;-\u00A4#,##0.00", // currency pattern > "#,##0%" // percent pattern > } > }, 52c59,60 < {"MXN", "$"} --- > {"MXN", "$"}, > {"USD", "US$"} ------- LocaleElements_pt_BR.java ------- 44c44,45 < {"BRL", "R$"} --- > {"BRL", "R$"}, > {"USD", "US$"} ------- LocaleElements_sv_SE.java ------- 37,38c37,38 < "#,##0.###;-#,##0.###", // decimal pattern < "#,##0.00 \u00A4;-#,##0.00 \u00A4", // currency pattern --- > "#\u00A0##0,###;-#\u00A0##0,###", // decimal pattern > "#.##0,00 \u00A4;-#.##0,00 \u00A4", // currency pattern List file(s) to be delivered : j2se/src/share/classes/sun/text/resources/LocaleElements_es_AR.java j2se/src/share/classes/sun/text/resources/LocaleElements_es_MX.java j2se/src/share/classes/sun/text/resources/LocaleElements_pt_BR.java j2se/src/share/classes/sun/text/resources/LocaleElements_sv_SE.java Target Build : Tiger Additional Info : ******** l10n evaluation template - end*********** ###@###.### 2003-12-09 Removing from fixed state due to issues with the fixes given. Confirmed that the fix for LocaleElements_sv_SE.java was backed out. I will assign ###@###.### to investigate whether additional fix is needed on this file, if so, then file a new bug to track it and add the bug number to "see also" field. ###@###.### 2004-03-26
11-06-2004