JDK-4699944 : REGRESSION: JLabels won't display Japanese characters in Windows LookAndFeel
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2002-06-10
  • Updated: 2002-06-10
  • Resolved: 2002-06-10
Related Reports
Duplicate :  
Description

Name: gm110360			Date: 06/10/2002


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

FULL OPERATING SYSTEM VERSION :
Microsoft Windows 2000 [Version 5.00.2195]

A DESCRIPTION OF THE PROBLEM :
If you use the system look and feel on Windows, JLabels
will not show Japanese characters.  Instead you see boxes
for all of the text.  Many other components that use
JLabels, such as JButton's, are broken as well. Other
components, such as JTextArea's and JComboBox's, are
working fine.  It works in 1.3.0 & 1.3.1.  It also works in
1.4 IF you DON'T set the look and feel.    I have not
tested on other platforms.

REGRESSION.  Last worked in version 1.3.1

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Compile the sample source code
2. Create the following files
MessageBundle.properties:
  unicodetext = cancel
MessageBundle_ja_JP.properties:
  unicodetext = \u30ad\u30e3\u30f3\u30bb\u30eb
3. Change locale to Japanese
4. Run the compiled java app

EXPECTED VERSUS ACTUAL BEHAVIOR :
Label in the frame should show japanese characters.

This bug can be reproduced always.

---------- BEGIN SOURCE ----------
public class SimpleFrame extends JFrame {

	private static java.util.ResourceBundle resMessageBundle =
java.util.ResourceBundle.getBundle("MessageBundle"); //$NON-NLS-1$;

	public SimpleFrame() {
		super();
	}
	
	public static void main(String[] args) {
		try {
			UIManager.setLookAndFeel
(UIManager.getSystemLookAndFeelClassName());
		}
		catch (Throwable e) {}
		SimpleFrame frame = new SimpleFrame();
		JPanel panel = new JPanel();
		JLabel label = new JLabel();
		label.setText(resMessageBundle.getString("unicodetext"));
		panel.add(label);
		frame.setContentPane(panel);
		frame.show();
	}
}
---------- END SOURCE ----------

Release Regression From : 1.3.1
The above release value was the last known release where this 
bug was known to work. Since then there has been a regression.

(Review ID: 145660) 
======================================================================

Comments
EVALUATION This has been fixed by 4615396, refer to it for more information. ###@###.### 2002-06-10
10-06-2002