Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6227961

Add Serbia and Montenegro locales

XMLWordPrintable

    • b68
    • x86
    • windows_2000

        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

              yyamasaksunw Yuriko Yamasaki (Inactive)
              rmandalasunw Ranjith Mandala (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: