-
Bug
-
Resolution: Fixed
-
P4
-
6
-
b33
-
x86
-
linux
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2154588 | 6u10 | Jiri Tusla | P4 | Resolved | Fixed | b12 |
JDK-2159188 | OpenJDK6 | Jiri Tusla | P4 | Resolved | Fixed | b06 |
FULL PRODUCT VERSION :
java version "1.6.0-rc"
Java(TM) SE Runtime Environment (build 1.6.0-rc-b91)
Java HotSpot(TM) Client VM (build 1.6.0-rc-b91, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Suse 10.1 Linux 2.6.16.21-0.25-default i686 i686 i386 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
Using a formatter set to Swedish locale outputs am/pm as time markers. While most people understand this, the correct values are fm./em.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a formatter, format ("Time %tp", System.currentTimeMillis()) and print result.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Time fm.
or
Time em.
ACTUAL -
Time am
or
Time pm
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.util.Formatter;
import java.util.Locale;
public class F {
public static void main(String args[]) {
StringBuilder sb = new StringBuilder();
Formatter f = new Formatter(sb, new Locale("sv"));
f.format("Time %tp", System.currentTimeMillis());
System.out.println(sb);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Have special case for locale "sv", or apply this diff:
Index: trunk/j2se/src/share/classes/sun/text/resources/FormatData_sv.java
===================================================================
--- trunk/j2se/src/share/classes/sun/text/resources/FormatData_sv.java (revision 52)
+++ trunk/j2se/src/share/classes/sun/text/resources/FormatData_sv.java (arbetskopia)
@@ -88,6 +88,12 @@
"l\u00f6" // abb Saturday
}
},
+ { "AmPmMarkers",
+ new String[] {
+ "fm.", // am marker
+ "em." // pm marker
+ }
+ },
{ "NumberElements",
new String[] {
",", // decimal separator
java version "1.6.0-rc"
Java(TM) SE Runtime Environment (build 1.6.0-rc-b91)
Java HotSpot(TM) Client VM (build 1.6.0-rc-b91, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Suse 10.1 Linux 2.6.16.21-0.25-default i686 i686 i386 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
Using a formatter set to Swedish locale outputs am/pm as time markers. While most people understand this, the correct values are fm./em.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a formatter, format ("Time %tp", System.currentTimeMillis()) and print result.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Time fm.
or
Time em.
ACTUAL -
Time am
or
Time pm
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.util.Formatter;
import java.util.Locale;
public class F {
public static void main(String args[]) {
StringBuilder sb = new StringBuilder();
Formatter f = new Formatter(sb, new Locale("sv"));
f.format("Time %tp", System.currentTimeMillis());
System.out.println(sb);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Have special case for locale "sv", or apply this diff:
Index: trunk/j2se/src/share/classes/sun/text/resources/FormatData_sv.java
===================================================================
--- trunk/j2se/src/share/classes/sun/text/resources/FormatData_sv.java (revision 52)
+++ trunk/j2se/src/share/classes/sun/text/resources/FormatData_sv.java (arbetskopia)
@@ -88,6 +88,12 @@
"l\u00f6" // abb Saturday
}
},
+ { "AmPmMarkers",
+ new String[] {
+ "fm.", // am marker
+ "em." // pm marker
+ }
+ },
{ "NumberElements",
new String[] {
",", // decimal separator
- backported by
-
JDK-2154588 Swedish localization has incorrect am/pm markers in FormatData_sv
-
- Resolved
-
-
JDK-2159188 Swedish localization has incorrect am/pm markers in FormatData_sv
-
- Resolved
-