JDK-2149452 : [Fmt-Nu] Formatting of percents incorrect for some locales
  • Type: Backport
  • Backport of: JDK-4494727
  • Component: globalization
  • Sub-Component: translation
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2007-05-18
  • Updated: 2011-04-08
  • Resolved: 2011-04-08
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.
JDK 6 JDK 7
6u10Fixed 7 b18Fixed
Comments
EVALUATION Fix for Switzerland/french (fr_CH) and Canadian Quebec (fr_CA) see bug 6547501 Switzerland/german: j2se:src/share/classes/sun/text/resources/FormatData_de_CH.java ------- FormatData_de_CH.java ------- 59c59 < "#,##0%" // percent pattern --- > "#,##0 %" // percent pattern Turkey: j2se:src/share/classes/sun/text/resources/FormatData_tr_TR.java ------- FormatData_tr_TR.java ------- 55c55 < "#,##0%" // percent pattern --- > "%#,##0" // percent pattern test: j2se:test/closed/sun/text/resources/LocaleDataTest.java j2se:test/closed/sun/text/resources/LocaleData > # following two lines are also for bug 4494727 > FormatData/fr_CA/NumberPatterns/2=#,##0 % > FormatData/fr_CH/NumberPatterns/2=#,##0 % > > # bug 4494727 > FormatData/de_CH/NumberPatterns/2=#,##0 % > FormatData/tr_TR/NumberPatterns/2=%#,##0
30-05-2007

EVALUATION Looking into a current implementation and found that: - Brazil, Iceland, Israel and South Africa use no space between number and %, no fix required. - Switzerland uses german, french and italian. In german and french they should have space between number and %. Italian has no space. - nl_BE and nl_NL requires fix: "#.##0%" -> "#.##0 pct" but according CLDR it uses % - Canadian province Quebec: fr_CA "#��##0%" -> "#��##0 %", verified with documents from http://www.gouv.qc.ca/portail/quebec/ - Turkey requires fix: "#.##0%" -> "%#.##0" - for arabic formats will stay as is. Need to improve the arabic digit handling first. Do fixes in j2se:src/share/classes/sun/text/resources/FormatData respective files.
30-05-2007