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

en_IN locale doesn't format currency amout properly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 5.0
    • core-libs
    • x86
    • windows_xp

      FULL PRODUCT VERSION :
      java version "1.5.0_16"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02)
      Java HotSpot(TM) Client VM (build 1.5.0_16-b02, mixed mode)
      1.6.0_11-b03

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :

      NumberFormat cf = NumberFormat.getCurrencyInstance(new Locale("en","IN"));
      System.out.println("-->"+cf.format(10000000.00));

      Prints:
      -->Rs.10,000,000.00

      Expected:
      -->Rs.1,00,00,000.00


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      java J
      see source code

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      -->Rs.1,00,00,000.00

      ACTUAL -
      -->Rs.10,000,000.00


      REPRODUCIBILITY :
      This bug can be reproduced always.

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

      public class J
      {
        public static void main(String[]ar)
        {
         NumberFormat cf = NumberFormat.getCurrencyInstance(new Locale("en","IN"));
          System.out.println("-->"+cf.format(10000000.00));
        }
      }

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

            peytoia Yuka Kamiya (Inactive)
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: