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

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P3
    • None
    • Affects Version/s: 17.0.5
    • Component/s: 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

            Assignee:
            Dmitry Cherepanov (Inactive)
            Reporter:
            Dmitry Cherepanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: