Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 836 by [email protected]: Characters from ibus-cangjie input method causes error on java application
http://code.google.com/p/ibus/issues/detail?id=836

What version of the product are you using? On what operating system?
OS (Linux distributions, UNIX or ...): Linux/OpenSolaris
Architecture (i386, x86_64):
IBus version: 1.2
Input method name and version: 1.2.0.20090717
Python version: 2.6
dbus version: 1.2.16
dbus-python version:
gtk version (if bug is about gtk applications):
qt version (if bug is about qt applications):

What steps will reproduce the problem?
----------------------------------------------------
By using ibus/cangjie(including cangjie3 and cangjie5), java application
shows error messages when specific characters are handled.

To reproduce,
--------------------------------------
1. Enable ibus+cangjie input method environment on desktop
2. Launch Notepad application bundled in jdk demo from terminal emulator

   java -jar /usr/java/demo/jfc/Notepad/Notepad.jar

3. Input the following characters on Notepad.

   Character (Cangjie)
   哈 (romr)
   吳 rvnk
   號 rsypu
   彭 gthhh
   曄 atmj
   民 rvp


What is the expected output? What do you see instead?
----------------------------------------------------
Error messages are:

    bash-4.0$ java -jar Notepad.jar
    2010-3-31 18:41:57 sun.awt.X11.XToolkit processException
    警告: Exception on Toolkit thread
    java.lang.IllegalArgumentException: Invalid substring range
at java.text.AttributedString.addAttribute(AttributedString.java:332) at sun.awt.X11InputMethod.dispatchComposedText(X11InputMethod.java:709)
        at sun.awt.X11.XlibWrapper.XFilterEvent(Native Method)
        at sun.awt.X11.XToolkit.run(XToolkit.java:574)
        at sun.awt.X11.XToolkit.run(XToolkit.java:505)
        at java.lang.Thread.run(Thread.java:619)


During conversion of these characters, some invalid characters are used.
It seems this invalid character numbers causes java error.

Reproducible both on Linux and OpenSolaris.



Please provide any additional information below.


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google
Groups "ibus-devel" group.
iBus project web page: http://code.google.com/p/ibus/
iBus dev group: http://groups.google.com/group/ibus-devel?hl=en

To unsubscribe, reply using "remove me" as the subject.

回复