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

ISO 3166 country names are not up to date

    Details

      Description

      A DESCRIPTION OF THE PROBLEM :
      The country names in LocaleNames.properties should reflect the ISO 3166 standard. There are some discrepancies.

      The Javadoc for Locale.getDisplayCountry states "Returns a name for the locale's country that is appropriate for display to the user." This can explain some of the differences, for example, "United Kingdom" vs. "United Kingdom of Great Britain and Northern Ireland".

      That said, there are some country names that are clearly wrong:
      CV should be "Cabo Verde" (http://news.nationalgeographic.com/news/2013/12/131212-maps-cabo-verde-cartography-science-cape-verde-africa)
      CZ should be "Czechia" (https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes#cite_note-18)
      MK should be "North Macedonia" (https://news.un.org/en/tags/prespa-agreement)
      RE should be "Réunion" (not "Reunion")
      SZ should be "Eswatini" (https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes#cite_note-19)

      Some more could be argued as well, particularly in respect of consistency:
      For example, why is the country name for BN "Brunei" and not "Brunei Darussalam" while for CD "The Democratic Republic Of Congo" is used instead of the short form "Congo"?

      VA uses "Vatican" while the official name is "Holy See"
      VN should probably be "Viet Nam" instead of Vietnam

      Lastly, there are still countries in the list which have been removed ("transitionally reserved") from the ISO standard:
      AN Netherlands Antilles
      CS Serbia and Montenegro

      We could make a case for keeping them but then the question becomes why other codes with the same status should not be included as well.
      https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Transitional_reservations

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      The names are defined here: http://hg.openjdk.java.net/jdk/jdk14/file/57148c79bd75/src/java.base/share/classes/sun/util/resources/LocaleNames.properties#l868

      It can be printed running:

      for (String country : Locale.getISOCountries())
      {
          System.out.println(country + ": " + new Locale("", country).getDisplayCountry(Locale.getDefault()));
      }


      FREQUENCY : always


        Attachments

          Activity

            People

            • Assignee:
              ljiang Leo Jiang
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: