Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4766655
Votes 1
Synopsis Cannot input underscore '_' in AWT Components with Japanese Keyboard
Category java:classes_awt
Reported Against 1.4.1
Release Fixed 1.4.2(mantis)
State 10-Fix Delivered, bug
Priority: 3-Medium
Related Bugs 4474756
Submit Date 22-OCT-2002
Description




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 :
Microsoft Windows XP [Version 5.1.2600]


EXTRA RELEVANT SYSTEM CONFIGURATION :
Japanese JIS keyboard with Japanese operating system.

DESCRIPTION OF THE PROBLEM :
When the character '_' is typed in on java.awt.TextArea, the character '|' is typed in, instead.

The problem occurs only on java.awt.TextArea and  java.awt.TextField with Japanese keyboard.

It does not occur on any version of J2SDK1.3.x.

It occurs only on Microsoft Windows.

It does not occur on javax.swing.* components.


REGRESSION.  Last worked in version 1.3.1

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1.Boot any java program that uses AWT Text Components.
2.Type '_' on the Text component.
3.That's all.


EXPECTED VERSUS ACTUAL BEHAVIOR :
Expected:
  The character '_' is typed in.

Actual Result:
  The character '|' is typed in, instead.


ERROR MESSAGES/STACK TRACES THAT OCCUR :
There are no error messages.


REPRODUCIBILITY :
This bug can be reproduced always.

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

public class SimpleAWTTextFrame extends java.awt.Frame {
  public static void main(String args[]) {
    SimpleAWTTextFrame f = new SimpleAWTTextFrame();
    f.setSize(100,100);
    f.setVisible(true);
  }
  
  TextField textfield;
  public SimpleAWTTextFrame() {
    textfield = new TextField();
    add(textfield);
  }
}

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

CUSTOMER WORKAROUND :
Cut and Paste, use US Keyboard,  or use javax.swing.* instead.
(Review ID: 165943) 
======================================================================
Work Around
N/A
Evaluation
The problem is that both the yen sign and the back-slash share the same codepoint. Furthermore both characters are represented by the same Java
virtual Key VK_BACK_SLASH. In nativeHandleEvent we check whether the user
has modified the KeyEvent by converting the Java key char to windows key
and comparing if it is  different from the Native event stored away in the
KeyEvent. If it is different, we then use the new key. The problem is that
when we map from the Java key char for backslash to Windows key we always find
the first windows key that maps to this which is 0xDC (VK_OEM_5) even though
the original windows key was 0xE2 (VK_OEM_102). This looks like a change and we cannot distinguish  this inadvertant change from a real user change. 

 xxxxx@xxxxx  2002-11-04
Comments
  
  Include a link with my name & email   

Submitted On 08-AUG-2003
nobuakik
input underscore via IME and press F10 key



PLEASE NOTE: JDK6 is formerly known as Project Mustang