-
Bug
-
Resolution: Fixed
-
P4
-
1.4.0, 6
-
b12
-
generic, x86
-
generic, windows_vista
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2149452 | 7 | Jiri Tusla | P4 | Closed | Fixed | b18 |
JDK-2143278 | 5.0u12 | Jiri Tusla | P4 | Resolved | Fixed | b01 |
Name: ddT132432 Date: 08/21/2001
java version "1.4.0-internal"
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-B)
Java HotSpot(TM) Client VM (build 1.3.0-B, mixed mode)
(The following information comes from IBM NLDG.)
The most common symbol used to indicate percent is %, as in 37%.
Brazil, Iceland, Israel, South Africa, and Switzerland prefer no space between
the number and the symbol, as follows: 37%.
The Dutch language as used in Belgium and the Netherlands sometimes uses pct
(as in 37 pct) to represent percentages.
In the Canadian province of Qu?bec, the number and symbol is written as 37 %,
with a space in between.
In Turkey, the percent symbol is written before the number: %37.
In some countries using Arabic script, 37 % may also be written using arabic
characters for the percent and numerals, e.g. \u066a\u0663\u0667
However, both JDK 1.3 and JDK1.4 beta return the same text for all supported
locales. For example, the following code returns '12%' regardless of locale.
----- PercentTest.java -----
import java.text.*;
import java.util.*;
public class PercentTest {
public static void main(String[] args) {
Locale locale[] = NumberFormat.getAvailableLocales();
for (int i = 0; i < locale.length; i++) {
System.out.println(locale[i].toString()+"("+locale[i].getDisplayCountry()+")"+"-->"+NumberFormat.getPercentInstance(locale[i]).format(0.1234));
}
}
}
----- end -----
(Review ID: 130424)
======================================================================
java version "1.4.0-internal"
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-B)
Java HotSpot(TM) Client VM (build 1.3.0-B, mixed mode)
(The following information comes from IBM NLDG.)
The most common symbol used to indicate percent is %, as in 37%.
Brazil, Iceland, Israel, South Africa, and Switzerland prefer no space between
the number and the symbol, as follows: 37%.
The Dutch language as used in Belgium and the Netherlands sometimes uses pct
(as in 37 pct) to represent percentages.
In the Canadian province of Qu?bec, the number and symbol is written as 37 %,
with a space in between.
In Turkey, the percent symbol is written before the number: %37.
In some countries using Arabic script, 37 % may also be written using arabic
characters for the percent and numerals, e.g. \u066a\u0663\u0667
However, both JDK 1.3 and JDK1.4 beta return the same text for all supported
locales. For example, the following code returns '12%' regardless of locale.
----- PercentTest.java -----
import java.text.*;
import java.util.*;
public class PercentTest {
public static void main(String[] args) {
Locale locale[] = NumberFormat.getAvailableLocales();
for (int i = 0; i < locale.length; i++) {
System.out.println(locale[i].toString()+"("+locale[i].getDisplayCountry()+")"+"-->"+NumberFormat.getPercentInstance(locale[i]).format(0.1234));
}
}
}
----- end -----
(Review ID: 130424)
======================================================================
- backported by
-
JDK-2143278 [Fmt-Nu] Formatting of percents incorrect for some locales
-
- Resolved
-
-
JDK-2149452 [Fmt-Nu] Formatting of percents incorrect for some locales
-
- Closed
-
- duplicates
-
JDK-6729832 NumberFormat returns XX% wrongly instead of %XX for Turkish Locale
-
- Closed
-
- relates to
-
JDK-6547501 There should be a space before % sign in French locale
-
- Resolved
-
-
JDK-4230387 RFE: JProgressBar does not create international percent done strings
-
- Closed
-