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

Update the root locale display names

    XMLWordPrintable

    Details

      Backports

        Description

        I compared country and region names of Locale.ROOT and Locale.US.
        On default, Locale.ROOT comes from JRE, Locale.US comes from CLDR.

        Testcase and output is as follows
        =========================
        $ cat ISO3166.java
        import java.util.*;

        public class ISO3166 {
            public static void main(String[] args) {
                for (String s : args) {
                    Locale loc = new Locale.Builder().setRegion(s).build();
                    String root = loc.getDisplayCountry(Locale.ROOT);
                    String us = loc.getDisplayCountry(Locale.US);
                    System.out.printf("%s: %s [%s<=>%s]%n", root.equalsIgnoreCase(us) ? "=" : " ", s, root, us);
                }
            }
        }
        $ ~/jdk-16.jdk/Contents/Home/bin/java -version
        openjdk version "16-ea" 2021-03-16
        OpenJDK Runtime Environment (build 16-ea+20-1092)
        OpenJDK 64-Bit Server VM (build 16-ea+20-1092, mixed mode, sharing)
        $ ~/jdk-16.jdk/Contents/Home/bin/java ISO3166.java BQ SZ
         : BQ [Bonaire, Sint Eustatius and Saba<=>Caribbean Netherlands]
         : SZ [Swaziland<=>Eswatini]
        =========================

        According to following URL, it seems country and region names are updated.
        https://github.com/eggert/tz/compare/2012e..master#diff-e5919fb2a195c61372529aa1b85af27218bd019942ea35bd1faf1fb746209560

        Also, see:
        https://www.iso.org/obp/ui/#iso:code:3166:BQ (I don't know which one is valid)
        https://www.iso.org/obp/ui/#iso:code:3166:SZ (Country name was changed)

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                naoto Naoto Sato
                Reporter:
                itakiguchi Ichiroh Takiguchi
                Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: