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

The NumberFormat for locale sq_XK formats price incorrectly.

XMLWordPrintable

    • b10
    • generic
    • generic
    • Verified

        A DESCRIPTION OF THE PROBLEM :
        does not show as 2.15 €

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        2.15 €
        ACTUAL -
         2,14 ¤

        ---------- BEGIN SOURCE ----------
         Locale localeAl = new Locale("sq", "XK");
                var language = localeAl.getLanguage();
                var country = localeAl.getDisplayCountry();
                System.out.println("language = " + language);
                System.out.println("country = " + country);
        // var locales = localeAl.getAvailableLocales();
        // for(var locale:locales){
        // System.out.println("locale = " + locale + " | " + locale.getDisplayCountry());
        // }
                NumberFormat formatter = NumberFormat.getCurrencyInstance(localeAl);
                String moneyString = formatter.format(price);
                System.out.println("price = " +moneyString);
        ---------- END SOURCE ----------

              naoto Naoto Sato
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: