-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
6u7
-
x86
-
windows_xp
FULL PRODUCT VERSION :
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
EXTRA RELEVANT SYSTEM CONFIGURATION :
US Locale
A DESCRIPTION OF THE PROBLEM :
Windows allows users to type extended ASCII characters from the main keyboard as follows: Type control-single quote, followed by a vowel to put an accent over that vowel. control-grave accent, followed by a vowel puts an acute accent over it. control (-shift) tilde, followed by an n, a, or o puts a tilde over it. Control (-shift) colon puts an umlat over a vowel.
None of these work in java applications.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1) Start with any standard Windows machine intended for USA users.
2) Open WordPad or just about any windows application (except Notepad or Firefox) and type control-single quote, e, to get the é character, just to verify that you know how to do this. Try this with other vowels, and with control-tilde, grave accent, colon, and caret (shift-6).
3) Launch the test application and try the same thing in both fields (One is a JTextField, the other is an AWT TextField.)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
You should be able to enter extend ASCII characters using these keystroke combinations, as you can in WordPad, Microsoft Word, and many other Windows applications.
ACTUAL -
You get characters with no diacritical marks. The control characters are ignored.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.GridLayout;
import java.awt.TextField;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
public class ExtendedAsciiBug extends JPanel {
public static void main(String[] args) {
System.out.println( System.getProperty( "java.version" ) );
JFrame frame = new JFrame( "Extended ASCII Bug" );
frame.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE );
frame.add( new ExtendedAsciiBug(), BorderLayout.CENTER );
frame.pack();
frame.setVisible( true );
}
public ExtendedAsciiBug() {
super( new GridLayout( 0, 1 ) );
addRow( "JTextField ", new JTextField( 30 ) );
addRow( "AWT TextField ", new TextField( 30 ) );
}
private void addRow(String label, Component cmp) {
JPanel panel = new JPanel( new BorderLayout() );
panel.add( new JLabel( label ), BorderLayout.WEST );
panel.add( cmp, BorderLayout.CENTER );
add( panel );
}
}
---------- END SOURCE ----------
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
EXTRA RELEVANT SYSTEM CONFIGURATION :
US Locale
A DESCRIPTION OF THE PROBLEM :
Windows allows users to type extended ASCII characters from the main keyboard as follows: Type control-single quote, followed by a vowel to put an accent over that vowel. control-grave accent, followed by a vowel puts an acute accent over it. control (-shift) tilde, followed by an n, a, or o puts a tilde over it. Control (-shift) colon puts an umlat over a vowel.
None of these work in java applications.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1) Start with any standard Windows machine intended for USA users.
2) Open WordPad or just about any windows application (except Notepad or Firefox) and type control-single quote, e, to get the é character, just to verify that you know how to do this. Try this with other vowels, and with control-tilde, grave accent, colon, and caret (shift-6).
3) Launch the test application and try the same thing in both fields (One is a JTextField, the other is an AWT TextField.)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
You should be able to enter extend ASCII characters using these keystroke combinations, as you can in WordPad, Microsoft Word, and many other Windows applications.
ACTUAL -
You get characters with no diacritical marks. The control characters are ignored.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.GridLayout;
import java.awt.TextField;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
public class ExtendedAsciiBug extends JPanel {
public static void main(String[] args) {
System.out.println( System.getProperty( "java.version" ) );
JFrame frame = new JFrame( "Extended ASCII Bug" );
frame.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE );
frame.add( new ExtendedAsciiBug(), BorderLayout.CENTER );
frame.pack();
frame.setVisible( true );
}
public ExtendedAsciiBug() {
super( new GridLayout( 0, 1 ) );
addRow( "JTextField ", new JTextField( 30 ) );
addRow( "AWT TextField ", new TextField( 30 ) );
}
private void addRow(String label, Component cmp) {
JPanel panel = new JPanel( new BorderLayout() );
panel.add( new JLabel( label ), BorderLayout.WEST );
panel.add( cmp, BorderLayout.CENTER );
add( panel );
}
}
---------- END SOURCE ----------