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

Currency formatting for some locales produces question marks

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.3.0
    • globalization



      Name: yyT116575 Date: 02/22/2001


      java version "1.3.0_01"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_01)
      Java HotSpot(TM) Client VM (build 1.3.0_01, mixed mode)

      Hi, I've come across this problem with using the Swedish
      ("sv", "SE") and French Locale and NumberFormat on NT (this
      works correctly on Sun). As well as testing with jdk 1.3.0_01, I
      have tested this with the jdk 1.2.2_006.
      i.e:

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

      public class Test {

        public static void main(String[] args) {

          double value=100000.00;

          Locale l = new Locale("sv","SE");
          NumberFormat nf = NumberFormat.getCurrencyInstance(l);
          System.out.println("Locale sv/SE gives [" + nf.format(value) + "]");

          l = new Locale("fr","FR");
          nf = NumberFormat.getCurrencyInstance(l);
          System.out.println("Locale fr/FR gives [" + nf.format(value) + "]");

          System.exit(0);
        }

      }
      --- END CODE ---

      --- RESULTS ---

      On NT gives the following results:
      Locale sv/SE gives [100?000,00 kr]
      Locale fr/FR gives [100?000,00 F]

      on Sun gives:

      Locale sv/SE gives [100 000,00 kr]
      Locale fr/FR gives [100 000,00 F]

      --- END RESULTS ---
      (Review ID: 117484)
      ======================================================================

            nlindenbsunw Norbert Lindenberg (Inactive)
            yyoungsunw Yung-ching Young (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: