I am having a problem with foreign characters when using jEdit 4.3pre9 on Ubuntu Feisty. It's not strictly a jEdit problem, but I was hoping that someone here more experienced with Java could help me.
The problem is this: when typing characters with an accent, those characters come out wrong in Java apps. It appears to only affect Swing apps (jEdit, Zend Studio). Eclipse, which uses SWT, does render the accents correctly. Please note that this has nothing to do with character encoding settings in the apps themselves.
With Java 1.5, when typing an accented character, it is replaced with a totally different character (I usually get the blank square); with Java 6, accented characters are replaced with the non-accented equivalent (for example, what should be ă comes out as the letter "a"). There is one exception: accented characters from the Latin-1 (ISO 8859-1) character set, such as "ü", "é" etc. are rendered correctly.
I ran the apps on sun-java5-jre and sun-java6-jre (from the Ubuntu repositories), as well as on Java 1.5 downloaded directly from Sun. There is no difference.
Here's the output of jEdit's keyboard troubleshooting feature when I try to type the characters:
I am trying to type ă (U+0103). jEdit running on Java 1.5.
Event KEY_PRESSED,keyCode=0x41,keyChar=0x1e3,modifiers=0 x20,consumed=0 filtered Event KEY_TYPED,keyCode=0x0,keyChar=0x1e3,modifiers=0x20 ,consumed=0 passed ==> Translated to <0,1e3> Event KEY_RELEASED,keyCode=0x41,keyChar=0x1e3,modifiers= 0x20,consumed=0 passed
Same character, jEdit running on Java 6.
Event KEY_PRESSED,keyCode=0x0,keyChar=0xffff,modifiers=0 x0,consumed=0 filtered Event KEY_PRESSED,keyCode=0x41,keyChar=0x61,modifiers=0x 20,consumed=0 filtered Event KEY_TYPED,keyCode=0x0,keyChar=0x61,modifiers=0x20, consumed=0 passed ==> Translated to <0,61> Event KEY_RELEASED,keyCode=0x0,keyChar=0xffff,modifiers= 0x20,consumed=0 passed Event KEY_RELEASED,keyCode=0x41,keyChar=0x61,modifiers=0 x0,consumed=0 passed
Any help would be greatly appreciated.