United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4517865 : Ascii to Unicode Conversion not working when using ALT+xxx input

Details
Type:
Bug
Submit Date:
2001-10-22
Status:
Resolved
Updated Date:
2003-06-04
Project Name:
JDK
Resolved Date:
2003-06-04
Component:
client-libs
OS:
windows_nt
Sub-Component:
java.awt
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.3.1
Fixed Versions:
1.4.2 (beta)

Related Reports
Relates:

Sub Tasks

Description

Name: yyT116575			Date: 10/22/2001


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

Have a program with a textfield. If we input characters by using "Alt+XXX"
combination, Ascii to unicode conversion is not happening properly.
I tried giving diffrent encoding schemes to system property 
"sun.io.unicode.encoding" and textfield.getBuffer("encoding"), 
nothing worked.

For example

Alt+4 should result in 9830 instead it comes as 63

Where as in MFC Unicode project we get the right values.

More examples

Key Input         VC++               Java

Alt+65              65                   65
Alt+5                9827               63
Alt+127           8962               166
Alt+181           9569               166

Resulting characters from VC++ is the actual unicode values.
(Review ID: 134113) 
======================================================================

                                    

Comments
EVALUATION

I'm not sure what we could have done to break this in 1.3.1, but we should 
make sure it works correctly in Tiger.  
###@###.### 2001-10-25

I think this is fixed in 1.4.2.  I tested with our latest build on Windows NT 
(a simple test with an AWT TextField that prints out all the data for each 
KeyEvent) and the keychar matched the expected values in the Description.  
The glyphs mostly seem to be non-ASCII, so that didn't help much: they don't 
appear as easily readable values in WordPad either.  

We should probably close this bug.  If problems are seen with 1.4.2 FCS, please 
file a new bug against that release.  
###@###.### 2003-06-04
                                     
2003-06-04
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
mantis-beta

FIXED IN:
mantis-beta

INTEGRATED IN:
mantis-beta


                                     
2004-06-14



Hardware and Software, Engineered to Work Together