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

Currency.getSymbol(Locale) returns incorrect symbol for en_SL and hr_HR

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3 P3
    • None
    • 17.0.5
    • core-libs

      This only affects jdk19u and below.

      JDK-8283277 introduced the currency code SLE associated to Sierra Leone but the currency symbol should be Le.

      Actual output:
      $ java Test en SL
      $ Locale: en_SL, Currency: SLE, Symbol: SLE

      Expected output:
      $ java Test en SL
      $ Locale: en_SL, Currency: SLE, Symbol: Le

      After JDK-8296239, the currency symbol for hr_HR should be the euro sign.

      Actual output:
      $ java Test hr HR
      Locale: hr_HR, Currency: EUR, Symbol: EUR

      Expected output:
      $ java Test hr HR
      Locale: hr_HR, Currency: EUR, Symbol: €

      Tested with latest jdk17u-dev. This works as expected in later versions with CLDR upgraded to v42 (JDK-8284840).

        1. Test.java
          0.4 kB
          Dmitry Cherepanov

            dcherepanov Dmitry Cherepanov
            dcherepanov Dmitry Cherepanov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: