JDK-6227961 : Add Serbia and Montenegro locales
  • Type: Enhancement
  • Component: globalization
  • Sub-Component: translation
  • Affected Version: 5.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2005-02-10
  • Updated: 2017-05-16
  • Resolved: 2006-01-19
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 JDK 6
5.0u8Fixed 6 b68Fixed
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
Windows 2000,
Reh Hat Linux
...

A DESCRIPTION OF THE PROBLEM :
Serbian locale (ISO code is "sr") is not supported in Java 5.0. Formating dates, numbers and other locale specific operations does not work for Serbian language.
The same is true for Serbain-latin locale or Serbo-Croat (ISO code "sh") which is also used in Serbia.
Both locales was supported in previous Java versions (1.4.x etc)

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Create new Locale object for Serbian language (sr or sh)
2. Get instance of  DateFormat class for serbian locale and Full style
3. Format current date


EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
On  1.4.2 JVM results are (today is February, 9th 2005)
-for "sr" locale:

- for "sh" locale:

Sreda, 2005, Februar 9

ACTUAL -
On Java 5 formatting current date with both locales returns:

Wednesday, February 9, 2005

ERROR MESSAGES/STACK TRACES THAT OCCUR :
There are no error messages

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import java.util.*;
import java.text.*;

public class SerbianLocale {
    
    public static void main(String[] args) {
        DateFormat srDateFormat =
			DateFormat.getDateInstance(DateFormat.FULL, new Locale("sr"));
DateFormat shDateFormat =
			DateFormat.getDateInstance(DateFormat.FULL, new Locale("sh"));

Date now = new Date();
//format current date
System.out.println(srDateFormat.format(now));
System.out.println(shDateFormat.format(now));
    
}

}
---------- END SOURCE ----------

Release Regression From : 1.4.2
The above release value was the last known release where this 
bug was known to work. Since then there has been a regression.
###@###.### 2005-2-10 22:29:53 GMT

Comments
EVALUATION The fix will be also backported in JDK5.0U8.
06-02-2006

EVALUATION This change is part of the CCC-approved removal of the Yugoslavia locales. See CR 4906428 for more information. ###@###.### 2005-2-10 22:59:34 GMT In response to additional comments I'm reopening this as an RFE to add support for Serbia and Montenegro locales. However, the more likely solution is through RFE 4052440 RFE: Pluggable locale support. ###@###.### 2005-2-18 20:24:07 GMT
10-02-2005