Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4517865

Ascii to Unicode Conversion not working when using ALT+xxx input

XMLWordPrintable

    • beta
    • x86
    • windows_nt



      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)
      ======================================================================

            kdmsunw Kdm Kdm (Inactive)
            yyoungsunw Yung-ching Young (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: