-
Enhancement
-
Resolution: Fixed
-
P3
-
1.3.0, 1.4.0, 1.4.1, 1.4.2
-
b40
-
x86
-
linux
java version "1.3.0beta_refresh"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0beta_refresh-b09)
Java HotSpot(TM) Client VM (build 1.3.0beta-b07, mixed mode)
Platform: x86-architecture, Linux kernel 2.2.16 (based on RedHat 6.0 with many
updates), XFree86 3.3.5
Java: JDK 1.2.2_006 or JDK 1.3.0beta_refresh
System Enveroment:
LANG=ru
LC_ALL=ru_RU.KOI8-R
Java property:
file.encoding=KOI8-R
For cyrillic input in XFree86 used Xkb. In Xkb setted 3 keyboard layout
("US/ASCII", "KOI8-R", "Cyrillic" ). The part of file with defines of symbols
for Cyrillic 'A':
----------------- start -----------------
key <AC04> { [ f, F ],
[ 0xc1, 0xe1 ],
[ Cyrillic_a, Cyrillic_A ] };
----------------- end -----------------
For switching keyboard layouts used ISO_Group.
For test of input used this application:
----------------- start -----------------
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;
public class ex {
boolean packFrame = false;
public ex() {
ex_frame frame = new ex_frame();
if (packFrame) {
frame.pack();
}
else {
frame.validate();
}
frame.setVisible(true);
}
public static void main(String[] args) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch(Exception e) {
e.printStackTrace();
}
new ex();
}
public class ex_frame extends JFrame {
JPanel contentPane;
GridLayout gridLayout1 = new GridLayout();
JTextField jTextField1 = new JTextField();
JButton jButton1 = new JButton();
JTextField jTextField2 = new JTextField();
public ex_frame() {
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
gridLayout1.setRows(2);
contentPane = (JPanel) this.getContentPane();
contentPane.setLayout(gridLayout1);
jTextField1.setToolTipText("input character here");
jTextField1.setDisabledTextColor(Color.gray);
jTextField1.setHorizontalAlignment(SwingConstants.CENTER);
jTextField1.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(KeyEvent e) {
jTextField1_keyTyped(e);
}
});
jTextField2.setToolTipText("Unicode code of input character");
jTextField2.setEditable(false);
jTextField2.setHorizontalAlignment(SwingConstants.CENTER);
contentPane.add(jTextField1, null);
contentPane.add(jTextField2, null);
}
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
System.exit(0);
}
}
void jTextField1_keyTyped(KeyEvent e) {
jTextField2.setText( Integer.toHexString( e.getKeyChar() ) );
}
}
}
----------------- end -----------------
In upper TextField input characters, in buttom TextFiled see Unicode code of
last input character in Hex.
For key with Cyrrilic 'A' (UNICODE code - 0x0410) we see:
in JDK 1.2.2_006
layout 1: 46 (correct for all - latin F)
layout 2: e1 (correct for KOI8-R, but incorrect for UNICODE)
layout 3: 6e1 (correct for Cyrillic_A defined in X11/keysymdef.h, but incorrect
for UNICODE - 0x06xx - arabic page)
in JDK 1.3.0beta_refresh
layout 1: 46 (correct for all - latin F)
layout 2: e1 (correct for KOI8-R, but incorrect for UNICODE)
layout 3: e1 (correct for KOI8-R, but incorrect for UNICODE)
PS: sorry for bad english.
(Review ID: 108045)
======================================================================
###@###.### 10/12/04 15:02 GMT
- duplicates
-
JDK-4647381 Can't type Hebrew into a JTextField under Linux
- Closed
-
JDK-4707542 Can't type some multi-character sequences with Swedish keyboard on Linux
- Closed
- relates to
-
JDK-4960727 xkb (X Keyboard Extension) support should be fixed in XAWT.
- Resolved
-
JDK-5014911 b32c, b40, b42 input Arabic and Hebrew charaters fail in JTextComponents
- Resolved
-
JDK-6234865 On X Window, XK_Cyrillic_ keysym is treated as an Arabic Unicode character.
- Resolved
-
JDK-4799499 dead key followed by space should produce non-dead character on Unix
- Resolved
-
JDK-4850149 Dead keys not working for Belgian keyboard
- Closed
-
JDK-4496099 Neither <Enter> key does not work under czech locale
- Closed
-
JDK-4797332 A few problems with dead keys in Swing text components
- Closed
-
JDK-4799500 dead key pressed/released twice should produce non-dead character on Unix
- Closed
-
JDK-6368034 Quotation marks and \u016F on czech keyboard
- Closed
-
JDK-2107667 KP_Separator handled wrong in KeyEvents
- Resolved
-
JDK-4957562 Character '|' cannot be entered on Danish SUN keyboard
- Resolved
-
JDK-4957565 Character '|', '~' and more cannot be entered on Danish keyboard
- Resolved
-
JDK-6225595 Czech keyboard doesn't work well on Linux
- Resolved
-
JDK-4725203 key on the numpad does not generate any key events on danish/swedish keyboards
- Resolved
-
JDK-4935357 Linux X cannot generate {}[] characters on Danish keyboards (remote display)
- Resolved
-
JDK-6195851 As XKB extension is ubiquitous now, #ifdef linux should be removed from awt_GraphicsEnv code
- Resolved
-
JDK-5056432 REGRESSION: Can't type some non-ASCII characters with Slovenian keyboard
- Closed
-
JDK-4765333 Italian dead keys on US Keyboard don't work with space key on Linux
- Closed