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

Ukrainian currency has wrong format

XMLWordPrintable

    • b02
    • x86
    • windows_xp
    • Verified

        FULL PRODUCT VERSION :
        java version "1.6.0_14"
        Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
        Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode, sharing)

        ADDITIONAL OS VERSION INFORMATION :
        On all versions of Windows XP, Vista, Linux and probably on others OS.

        A DESCRIPTION OF THE PROBLEM :
        Ukrainian currency has wrong format.

        Locale loc2 = new Locale("uk","UA");
        NumberFormat curFormat = NumberFormat.getCurrencyInstance(loc2);
        double ¿ = 1234.57;
        System.out.println("Sum = " + curFormat.format(c));

        prints:

        Sum = 1.234,57 ¿¿¿.

        but should print:

        Sum = 1 234,57 ¿¿¿.

        ("¿¿¿." must be replaced with "¿¿¿." and dot "." with space " ")

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Set regional setting to Ukrainian in your operation system (by the way, Windows settings for Ukrainian locale is right, but Java takes this setting from an other place).


        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        Locale loc2 = new Locale("uk","UA");
        NumberFormat curFormat = NumberFormat.getCurrencyInstance(loc2);
        double ¿ = 1234.57;
        System.out.println("Sum = " + curFormat.format(c));

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

        Source code:

              katakai Masaki Katakai
              ndcosta Nelson Dcosta (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: