JDK-7194099 : Non-latin characters not displayed if mixed with latin characters (Windows L&F)
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 7
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: windows_7
  • CPU: x86
  • Submitted: 2012-08-25
  • Updated: 2018-09-05
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
tbdUnresolved
Description
FULL PRODUCT VERSION :
java version "1.7.0_06"
Java(TM) SE Runtime Environment (build 1.7.0_06-b24)
Java HotSpot(TM) 64-Bit Server VM (build 23.2-b09, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [version 6.1.7601]

A DESCRIPTION OF THE PROBLEM :
When setting the windows Look and Feel, non-latin characters are not displayed in JComponents.

This only concerns the Windows L&F. With Metal and Nimbus, characters are correctly displayed.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Run the attached program
2. Look out at the JFrame title
3. Look out at the JComponents text

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
1. A JFrame is displayed
2. The JFrame title displays the string "\u0e37name:th=\u0e37"
3. The JComponents display the string "\u0e37name:th=\u0e37"
ACTUAL -
1. OK
2. OK
3. KO: the JComponents do not show the first \u0e37 character. The last one is mixed with the '=' character.

REPRODUCIBILITY :
This bug can be reproduced always.

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

public class DialogTest {

    public final static String string = "\u0e37name:th=\u0e37";
    
    public static void main(String[] argv) {
        try {
			UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
	        final JFrame frame = new JFrame(string);
	        frame.setLayout(new GridLayout(3,1));
	        frame.add(new JLabel(string));
	        frame.add(new JTextField(string));
	        frame.add(new JButton(string));
	        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	        frame.pack();
	        frame.setLocationRelativeTo(null);
	        frame.setVisible(true);
	        
		} catch (Exception e) {
			e.printStackTrace();
		}
    }
}
---------- END SOURCE ----------

Comments
- this is an issue reported against 7(7u), - there are now affected version 9 filed for this issue - 7u issues are transferred to Sustaining Nevertheless if someone have a report against 9 - please reopen and add affectedVersion 9 or 7u specific escalations might be reopen to Sustaining
10-08-2014

- this is an issue reported against 7(7u), - there are now affected version 9 filed for this issue - 7u issues are transferred to Sustaining Nevertheless if someone have a report against 9 - please reopen and add affectedVersion 9 or 7u specific escalations might be reopen to Sustaining
10-08-2014