-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
1.3.0
-
Fix Understood
-
x86
-
windows_nt
A Java application has a title that contains Greek Unicode characters represented by the byte values "\u0391\u0392\u0393\u0394\u0395\u0396". When this application is run on a system with the Default system Locale set to "Greek" and the font used for the Active Title Bar set to Lucida sans Unicode, the title displays correctly. If the default system Locale is changed to another Locale (say UK English), the title is displayed as "??G??".
The following tests demonstrate the difference between Java and Native apps.
Test 1. With the default System Locale set to Greek. Create a text file saved with a name that has the same Greek characters in the title. Swap Locales. Open the document in WordPad and the title bar displays the document name correctly regardless of the Locale.
Test 2. With the default System Locale set to Greek. Create a directory with a name that contains the same greek characters and open that directory in Windows Explorer. The title bar of Explorer displays the name correctly regardless of Locale.
The following Test Case follows the problem description above. If run with the default Syatem Locale set to "Greek", it works fine. If the Locale is set to something other than "Greek" the title displays as "??G??"
--------- cut here ---------
import javax.swing.*;
import java.awt.*;
public class TitleTest extends JFrame
{
public static void main(String[]args)
{
TitleTest f = new TitleTest();
f.setSize(300,200);
String str = ("\u0391\u0392\u0393\u0394\u0395\u0396");
f.setTitle(str);
JLabel label = new JLabel(str);
System.out.println(str);
f.getContentPane().add(label);
f.setVisible(true);
}
}
--------- cut here ---------