JDK-4797332 : A few problems with dead keys in Swing text components
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.1
  • Priority: P4
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: linux
  • CPU: x86
  • Submitted: 2002-12-23
  • Updated: 2006-01-12
  • Resolved: 2006-01-12
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
Name: jk109818			Date: 12/22/2002


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


FULL OPERATING SYSTEM VERSION :
Mandrake Linux release 8.2 (Bluebird) for i586
Linux Kernel version 2.4.18, release 6mdk
glibc version 2.2.4, release 25mdk

EXTRA RELEVANT SYSTEM CONFIGURATION :
german keymap using dead keys

A DESCRIPTION OF THE PROBLEM :
In Swing text components under any Linux system with a
keymap using dead keys, the characters which are composed by
pressing a dead key and e.g. space (on a German keyboard
characters like ~,`,',��,M-^@, etc.) cannot be entered.

This problem does not occur in AWT text components.

This problem is around since at least 1.3.0 and has already
been reported (cf. Bug #4379138). Bug #4379138 is reported
to be fixed, *which it is not*. See the user comments to
#4379138 (last comment from 11/23/2002).

The problem was not there in J2SDK 1.2.



STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. select a keymap using dead keys
2. run the supplied Java program (see below) or run any Java
program with Swing text components
3. try to enter a 'composed' character by pressing a dead
key followed by ENTER

EXPECTED VERSUS ACTUAL BEHAVIOR :
expected: the composed character should appear
actual: it doesn't

ERROR MESSAGES/STACK TRACES THAT OCCUR :
no messages

REPRODUCIBILITY :
This bug can be reproduced always.

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

public class TestDeadKeys
{
	public static void main(String[] args)
	{
		JFrame jframe = new JFrame("Swing Frame");
		Container pane = jframe.getContentPane();
		pane.setLayout(new FlowLayout());
		pane.add(new JLabel("please enter dead-keys (e.g., '~')"));
		pane.add(new JTextField(20));
		jframe.pack();
		jframe.setVisible(true);
	}
}

---------- END SOURCE ----------

CUSTOMER WORKAROUND :
- run J2SDK 1.2

- do not enter such characters (which is not a solution at
all: I use jEdit, an editor written in Java; not being able
to enter "~" is a real drawback for e.g. Perl programming).

- use a keymap without dead keys (not a good solution as
well, since characters as "��" could not be entered anymore)
(Review ID: 178589) 
======================================================================

Name: jk109818			Date: 12/22/2002


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

Also Java 1.3.

FULL OPERATING SYSTEM VERSION :
Mandrake 9, Intel

ADDITIONAL OPERATING SYSTEMS :
all Linux platforms


A DESCRIPTION OF THE PROBLEM :
Using dead keys in X Windows, certain characters, such as
apostrophe and tilde cannot be typed into a Swing widget
(probably AWT, as well). The problem is well documented in
bug 4379138. That bug has been closed as fixed, but
erroneously, as many comments on that bug will confirm. The
bug should either be reopened or a new one should be opened.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Open an app or applet with a JTextField.
2. Activate dead keys with xmodmap or with
   a KDE keyboard configuration.
3. Type "alt apostraphe a" ->  �� appears.
   Type "alt apostrophe apostrophe" -> nothing appears.

EXPECTED VERSUS ACTUAL BEHAVIOR :
On typing "alt apostrophe apostrophe", nothing appears. In
all non-Java apps an apostrophe appears.

REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER WORKAROUND :
There is no work around. It is impossible for me to utilize
a Java app for any language using non-ASCII characters,
between important punctuation marks and symbols become
untypable.
(Review ID: 179307)
======================================================================

Comments
EVALUATION Fixed under umbrella 4360364.
12-01-2006

EVALUATION The submitters (that I was able to contact) of 4379138 and its duplicates have all agreed that the problems they were having are solved with 1.4.1. Most likely, the submitters of this report are seeing problems unrelated to 4379138. Specifically, I think they are seeing one or more of 4707542, 4799499, 4799500. Emailed both submitters to clarify some inconsistencies in this report (e.g. in one place it says that a-grave cannot be typed, but in another, it says it works fine) on January 6, 2003. ###@###.### 2003-01-06 There are two reports in the Description of this bug report. The first one has Review ID: 178589, and the second has Review ID: 179307. Review ID: 178589 ----------------- > In Swing text components under any Linux system with a > keymap using dead keys, the characters which are composed by > pressing a dead key and e.g. space (on a German keyboard > characters like ~,`,',��,M-^@, etc.) cannot be entered. I corresponded with the submitter, and he says that ��, M-^@, etc. can be entered correctly with 1.4.1. However, he is having problems with ~, `, ' which are entered by pressing a dead key followed by a space. This sounds like bugid 4799499 (and similar to 4707542). > 3. try to enter a 'composed' character by pressing a dead > key followed by ENTER This turned out to be a mistake: the submitter meant to press a dead key followed by space, not enter. Review ID: 179307 ----------------- This is more complicated. This submitter is using two different methods of character entry. Under one of them, the right Alt key is XK_Multi_key (which is the Compose key on a Sun Type 5 keyboard). This is likely to be solved by the same fix as for 4799500. The other method of character entry is "US with dead keys" under KDE 3.0. It is _not_ an xmodmap file, apparently, but a "key mapping". With this mapping, he can use Alt as a modifier key to produce some characters. I'm less sure what this issue is about, so I may decompose it into a separate bug report. ###@###.### 2003-01-08
08-01-2003