JDK-6351682 : Country name for Korean is wrong in Simplified Chinese
  • Type: Bug
  • Component: globalization
  • Sub-Component: translation
  • Affected Version: 1.4.2,5.0u6,6
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,windows_xp
  • CPU: generic,x86
  • Submitted: 2005-11-17
  • Updated: 2006-04-19
  • Resolved: 2006-04-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6
5.0u7Fixed 6 b81Fixed
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 ----------

Comments
EVALUATION In 5.0 update, the bug can be fixed by updating /j2se/src/share/classes/sun/text/resources/LocaleElements_zh.java In mustang, the bug can be fixed by updating j2se/src/share/classes/sun/util/resources/LocaleNames_zh_CN.properties
04-01-2006