-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
1.1.4, 1.2.0
-
None
-
x86, sparc
-
solaris_2.5.1, windows_95, windows_nt
Name: diC59631 Date: 09/25/97
We are licensee (Oracle Corp.)
Oracle bug #548698
Can not enter any non-iso-latin-1 character.
This happens in any text field, either lightweight or full awt.
Lightweight text field throws the following exception:
Exception occurred during event dispatching:
java.lang.IllegalArgumentException: invalid keyChar
at java.awt.event.KeyEvent.<init>(KeyEvent.java:239)
at java.awt.LightweightDispatcher.processKeyEvent(Container.java:1361)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:1352)
at java.awt.Container.dispatchEventImpl(Container.java:884)
at java.awt.Component.dispatchEvent(Component.java:1693)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:63)
Full awt text field just beeps.
When the JVM receives a key down message from windows, it converts this key
from Ansi to Unicode. It uses the function MultiByteToWideChar (it is used
for any char set, not only MultiByte) to do that. They pass to this function
m_CharSet which should be the current keyboard language CODE_PAGE-PAGE.
m_CharSet is initialized correctly in AwtComponent::AwtComponent() to the
system default Ansi Code page
m_CharSet = GetACP();
In function AwtComponent::WmInputLangChange, when the user switches the
keyboard language, they set m_CharSet to the keyboard language Character set,
not the Code-page, and here is the problem. When we use this value as the
first parameter to MultiByteToWideChar() it returns an error, an no character
value is added to the key event message that is sent to the Java side.
The problem happens if you use JDK 1.1.4x or Netscape 4.0.2 (or 4.0.3) with
the latest JDK 1.1 patch on http://Developer.Netscape.com.
I was able to reproduce this problem on Arabic windows 95, Chinese windows 95,
US windows NT4.0 that has SK3 installed, and Arabic NT4.0 with SK3 installed.
The bug simply affects all win95 versions that is not ISO-Latin1 language. And
all NT4.0 with SK3 installed.
This is really a serious problem, we already have some customers in Egypt who
are using Netscape on Arabic win95 and cannot use it to type Arabic language.
It also affects all Multibyte languages and Easter European languages.
======================================================================
- duplicates
-
JDK-4057736 The characters other than ascii can't be displayed on the Component.
- Closed