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

Thursday is misspelled in Bulgarian locale

XMLWordPrintable

    • b24
    • x86
    • linux, windows_nt

      Name: jl125535 Date: 07/15/2004


      FULL PRODUCT VERSION :
      java version "1.5.0-beta2"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b51)
      Java HotSpot(TM) Client VM (build 1.5.0-beta2-b51, mixed mode, sharing)


      ADDITIONAL OS VERSION INFORMATION :
      It is found in all JDK/JRE releases which include Bulgarian l10n in Linux and Windows OS.

      A DESCRIPTION OF THE PROBLEM :
      Thursday is misspelled in Bulgarian locale. The same typo exists in Microsoft Windows 95 until XP. Finally it was fixed in Windows XP. Seems that Sun and Microsoft use the same source.

      Note that error is not inherited from locale data of OS. Linux and Win XP has it right, but Java still produces the wrong one.

      I found error and de-compile the class. One character simply must be replaced.

      I am talking about class
      sun.text.resources.LocaleElements_bg

      "DayNames", new String[] {
      "\u041D\u0435\u0434\u0435\u043B\u044F",
      "\u041F\u043E\u043D\u0435\u0434\u0435\u043B\u043D\u0438\u043A",
      "\u0412\u0442\u043E\u0440\u043D\u0438\u043A",
      "\u0421\u0440\u044F\u0434\u0430",
      "\u0427\u0435\u0442\u0432\u044A\u0432\u0442\u044A\u043A",
      "\u041F\u0435\u0442\u044A\u043A",
      "\u0421\u044A\u0431\u043E\u0442\u0430"}

      Wrong element is 5, char 6, counting from 1.

      Wrong one is
      "\u0427\u0435\u0442\u0432\u044A\u0432\u0442\u044A\u043A",
      Correct one is
      "\u0427\u0435\u0442\u0432\u044A\u0440\u0442\u044A\u043A",

      ____________________________******_________________

      wrong - \u0432
      correct - \u0440


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      ACTUAL -
      ÈâÃùÈâÃÑÈâÃM-^YÈâÃóÈâæÈâÃóÈâÃM-^YÈâæÈâì, 2004, ÈâäÈâýÈâÿ 15 (in English - Thurstay, 2004, July 15).

      EXPECTED -
      ÈâÃùÈâÃÑÈâÃM-^YÈâÃóÈâæÈâÃM-^WÈâÃM-^YÈâæÈâì, 2004, ÈâäÈâýÈâÿ 15 (in English - Thursday, 2004, July 15)

      REPRODUCIBILITY :
      This bug can be reproduced always.

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

      public class test {

      public static void main(String args[]) throws Exception {

              DateFormat df = DateFormat.getDateInstance(DateFormat.FULL,
                                                         new Locale("bg"));
              System.out.println(df.format(new Date("7/15/2004")));
      }

      }

      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      DateFormatSymbols dfs = new DateFormatSymbols(new Locale("bg"));
      dfs.setWeekdays("Here provide the right one")
      (Incident Review ID: 285589)
      ======================================================================
      ###@###.### 10/18/04 11:17 GMT

            jtusla Jiri Tusla (Inactive)
            jleesunw Jon Lee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: