JDK-4517865 : Ascii to Unicode Conversion not working when using ALT+xxx input
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.3.1
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_nt
  • CPU: x86
  • Submitted: 2001-10-22
  • Updated: 2003-06-04
  • Resolved: 2003-06-04
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.
Other
1.4.2 betaFixed
Related Reports
Relates :  
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
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis-beta FIXED IN: mantis-beta INTEGRATED IN: mantis-beta
2004-06-14

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