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

Country name for Korean is wrong in Simplified Chinese

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b81
    • CPU:
      generic, x86
    • OS:
      generic, windows_xp

      Backports

        Description

        FULL PRODUCT VERSION :
        java version "1.4.2_09"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_09-b05)
        Java HotSpot(TM) Client VM (build 1.4.2_09-b05, mixed mode)

        ADDITIONAL OS VERSION INFORMATION :
        Microsoft Windows XP [Version 5.1.2600]

        A DESCRIPTION OF THE PROBLEM :
        The country name for "Korean" is wrong when using Simplified Chinese locale.


        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Attached is an example, that lists all available countries and languages.
        When you run this java example on Simplified Chinese Windows, the country name for Korean is wrong.
        As was explained to me, in Chinese the Republic of Korea was years ago translated into South Korea, which is kind of offensive to Republic of Korea. So the Chinese are using a different translation of the country name, but in Java Calendar.getAvailableLocales() still returns the old translation.


        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        import java.util.*;
        import javax.swing.*;

        public class LocaleTest extends JFrame
        {
            private JLabel lbl;
            private JList jListLocales;
            private JScrollPane jScrollPaneListLocale;
            
            private Vector v;
            
            /** Creates new form LocaleTest */
            public LocaleTest()
            {
             super("Locale Test");
            
                lbl = new JLabel();
                getContentPane().setLayout(null);
                
                Locale.setDefault(Locale.getDefault());
        Locale[] loc = Calendar.getAvailableLocales();

                setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
                lbl.setText("Current locale :: " + Locale.getDefault());
                getContentPane().add(lbl);
                lbl.setBounds(15, 15, 180, 25);
        v = new Vector();

        String tmp_loc = null;
        for (int i = 0; i < loc.length - 1; i++)
                {
        if ((!loc[i].getDisplayCountry().equals("")) && (!loc[i].getDisplayLanguage().equals("")))
                    {
        tmp_loc = loc[i].getDisplayCountry() + " [" + loc[i].getDisplayLanguage() + "]";
        if (!isDuplicated(v, tmp_loc))
                        {
        v.add(tmp_loc);
        }
                    }
                }
                
                jListLocales = new JList(v);
                jScrollPaneListLocale = new JScrollPane(jListLocales);
                getContentPane().add(jScrollPaneListLocale);
                jScrollPaneListLocale.setBounds(15, 50, 240, 150);
                
                pack();
        setBounds(400, 250, 280, 250);
            }
            
            public boolean isDuplicated(Vector list, String tmp_locale) {
             for (int i=0; i<list.size() - 1; i++) {
             if ((list.get(i)).equals(tmp_locale))
             return true;
             }
            
             return false;
            }
            
            public static void main(String args[]) {
                java.awt.EventQueue.invokeLater(new Runnable() {
                    public void run() {
                        new LocaleTest().setVisible(true);
                    }
                });
            }
        }

        ---------- END SOURCE ----------

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                lzhaosunw Lucy Zhao (Inactive)
                Reporter:
                gmanwanisunw Girish Manwani (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: