JDK-6371251 : Tilde (~) and characters with tilde cannot be entered on some keyboards
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2006-01-11
  • Updated: 2011-01-19
  • Resolved: 2008-06-24
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.
JDK 7
7Resolved
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.6.0-rc"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-rc-b66)
Java HotSpot(TM) Client VM (build 1.6.0-rc-b66, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]

EXTRA RELEVANT SYSTEM CONFIGURATION :
Windows "Text Services and Input Languages" settings:
language=Finnish, keyboard=Finnish

A DESCRIPTION OF THE PROBLEM :
In the finnish keyboard, one should be able to input a tilde character (~) with the following key sequence: <alt gr>+<tilde>, <space>.

I.e. <alt gr>+<title> is dead key combination, which can also be used to produce characters such as a with tilde (����, produced with <alt gr>+<tilde>, <a>) and n with tilde (����, produced with <alt gr>+<tilde> <a>), etc.

This bug has previously been reported as 4957565, but that has been closed as resolved in b40. Obviously the resolution has not been tested because the bug persists.

Also I would like to note that the bug is in the 1.5.0_06 and needs to be fixed fast.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Get a Finnish keyboard (if available, otherwise see instructions at the end)
2. Change the keyboard layout to Finnish in XP (for instructions see http://www.microsoft.com/globaldev/handson/user/xpintlsupp.mspx)
3. Launch any Java application with a AWT TextField or Swing JTextField
4. Set focus to the TextField
5. Press simultaneously the "Alt Gr" button and the button with tilde (~) on it. Release.
6. Press space
7. Repeat 6
8. Press "a"

Note: on Finnish keyboard, the button with tilde (~) has also the acute (^) and the diaeresis (����), the button is located just left to enter, at the same location where the button with } and ] is on the UK keyboard. See also http://en.wikipedia.org/wiki/Keyboard_layout for a picture of the layout.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Step 5 should not produce any character
Step 6 should produce the lone character tilde (~)
Step 7 should not produce any character
Step 8 should produce the lone character a with tilde (����)
ACTUAL -
Step 5 does not produce anything (as expected)
Step 6 produces a space
Step 7 does not produce anything (as expected)
Step 8 produces the character "a"

REPRODUCIBILITY :
This bug can be reproduced always.

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

public class TildeTest  {
  public static void main(String[] args) {
    Frame f = new Frame();
    f.add(new TextField());
    f.pack();
    f.setVisible(true);
  }
}
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
There is no proper workaround.

The tilde character can be produced on the Finnish keyboard with the following key sequence: <tilde>, <alt gr>+<tilde>. This will produce the characters diaeresis (����) and tilde (~), after which one can delete the unwanted diaeresis away.

However, the above workaround does not allow typing in any of the tilde characters, such as a with tilde (����) or n with tilde (����).

Comments
EVALUATION Tested on a Finnish keyboard: fixed with 6253172 in jdk7 b29, 6u10 b24 and (under MS Windows) some 1.5 update release.
24-06-2008

EVALUATION First off, 4957565 was Linux-related bug, and with XAWT it is fixed indeed. In this CR platform is MS Windows, and most probably it is a duplicate to 6353098. Reason I'm not closing it as such is, after planned fix in Dolphin, someone with real Finnish keyboard should verify it (in 6353098 keyboard is Swedish). Again, perhaps it will never be fixed for Windows 98.
12-01-2006