The standard characters set in SimpleDateFormat should match
the length of the localised characters obtained from our locale
data.
ChangeLog:
2008-12-30 Andrew John Hughes <[email protected]>
* java/text/SimpleDateFormat.java:
(standardChars): Use standard characters from CLDR.
(RFC822_TIMEZONE_FIELD): Fixed to match new standard
characters.
--
Andrew :)
Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net
PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
Index: java/text/SimpleDateFormat.java
===================================================================
RCS file: /sources/classpath/classpath/java/text/SimpleDateFormat.java,v
retrieving revision 1.60
diff -u -u -r1.60 SimpleDateFormat.java
--- java/text/SimpleDateFormat.java 5 May 2008 18:42:07 -0000 1.60
+++ java/text/SimpleDateFormat.java 31 Dec 2008 01:37:09 -0000
@@ -235,8 +235,8 @@
*/
private static final long serialVersionUID = 4774881970558875024L;
- // This string is specified in the Java class libraries.
- private static final String standardChars = "GyMdkHmsSEDFwWahKzZ";
+ // This string is specified in the root of the CLDR.
+ private static final String standardChars = "GyMdkHmsSEDFwWahKzYeugAZvcL";
/**
* Represents the position of the RFC822 timezone pattern character
@@ -244,7 +244,7 @@
* U.S. locale, this is 'Z'. The value is the offset of the current
* time from GMT e.g. -0500 would be five hours prior to GMT.
*/
- private static final int RFC822_TIMEZONE_FIELD = 18;
+ private static final int RFC822_TIMEZONE_FIELD = 23;
/**
* Reads the serialized version of this object.
@@ -576,6 +576,7 @@
int j = oldChars.indexOf(ch);
if (j >= 0)
ch = newChars.charAt(j);
+
}
buf.append(ch);
}