JDK-4967868 : Problem with danish characters in TextField
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86
  • Submitted: 2003-12-12
  • Updated: 2004-06-07
  • Resolved: 2004-06-07
Related Reports
Duplicate :  
Relates :  
Description
Name: rmT116609			Date: 12/12/2003


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

java version "1.4.2_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)


ADDITIONAL OS VERSION INFORMATION :
Linux <REMOVED> 2.4.20-20.9 #1 Mon Aug 18 11:37:49 EDT 2003 i686 i686 i386 GNU/Linux


EXTRA RELEVANT SYSTEM CONFIGURATION :
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

A DESCRIPTION OF THE PROBLEM :
It is not possible to enter danish characters (e.g. ?, ? and ?) in a java.awt.TextField when the echo character is set. It works fine without the echo character set. Moreover, it is not possible to type new characters in the text field when a danish character has been entered.

The additional danish characters are ?, ? and ?.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
See the attached test program.

1. compile the applet
2. start the applet using e.g. a browser
3. type something in the text field
4. set the echo character, try to type in a danish character
5. when one danish character has been entered is not possible to enter any more characters

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
That is should be possible to enter danish characters in a TextField with the echo character set.
ACTUAL -
Once a danish character has been entered, it is not possible to enter more characters (even if these are english).

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import java.applet.Applet;
import java.awt.Button;
import java.awt.TextField;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class DanishChar extends Applet implements ActionListener
{
	private TextField ivTf;
	private Button ivBtn;

	public void init()
	{
		super.init();
		
		ivTf = new TextField("", 25);
		add(ivTf);
		
		ivBtn = new Button("Toggle echo");
		ivBtn.addActionListener(this);
		add(ivBtn);
		
		setSize(300, 100);
	}
	
	public void actionPerformed(ActionEvent pAe)
	{
		if (ivTf.echoCharIsSet()) {
			ivTf.setEchoChar((char)0);
		}
		else {
			ivTf.setEchoChar('*');
		}
		ivTf.setText(ivTf.getText());
	}
}

---------- END SOURCE ----------
(Incident Review ID: 228250) 
======================================================================
###@###.### 2004-03-11

Comments
EVALUATION Name: dkR10074 Date: 01/05/2004 I could not reproduce the bug exactly, since bug 4960727 may interfere with this bug. It would be helpful to know whether the tested environment is "Gnome & xkb" or not, and whether this bug is reproducible with: 1. the latest JDK1.5.0 build. 2. Mozilla 1.4. 3. appletviewer (instead of browser). ###@###.### 2004-01-05 ====================================================================== Name: rpR10076 Date: 06/07/2004 No additional information is available from the submitter. We will assume the problem happens because of xkb, and therefore should be resolved with 4960727. Closing out as a duplicate of 4960727. ###@###.### ======================================================================
17-09-2004