Re: Apple X11 + Japanese input method (kotoeri)
Re: Apple X11 + Japanese input method (kotoeri)
- Subject: Re: Apple X11 + Japanese input method (kotoeri)
- From: "Dave Williss" <email@hidden>
- Date: Tue, 25 Apr 2006 13:05:56 -0500
I am having trouble getting kinput2 to work under Mac OS 10.4
Here's what I do...
_Xsetlocale(LC_CTYPE, "ja_JP.SJIS"); // also tried ja_JP, ja,
ja_JP.eucJP, ja_JP.EUC
Note, if I use setlocale instead of _Xsetlocale, XOpenIM returns NULL. Not
sure why, but not important now.
if (XSupportsLocale()) { // returns true
XSetLocaleModifiers("@im=kinput2");
xim = XOpenIM(display, 0, 0, 0);
... (initialize some structures like PStartCB )
XVaNestedList preedit_attr = XVaCreateNestedList (0,
XNPreeditStartCallback, &PStartCB,
.. (I set up others, but omit from email)
NULL);
// status_attr is setup similar to preedit_attr
xic = XCreateIC(xim,
XNClientWindow, XtWindow(w),
XNInputStyle, XIMPreeditCallbacks|XIMStatusCallbacks,
XNPreeditAttributes, preedit_attr,
XNStatusAttributes, status_attr,
NULL);
// verified that XtWindow(w) is not 0, xic returns a valid pointer
// I've also tried XIMPreeditNothing and XIMStatusNothing with no
callbacks
}
At this point, everything seems OK until the user hits Shift-Space to
activeate the IME. Then the program locks up. If I hit break in gdb, I see
that it's in...
#0 semaphore_wait_signal_trap
#1 pthread_mutex_lock
#2 _XLockDisplay
#3 _XGetWindowAttributes
#4 _XimGetWindowEventmask
#5 _XimTriggerNotify
#6 _XimOnKeyCheck
#7 _XimProtoKeypressFilter
#8 XFilterEvent
#9 _XtDefaultDispatcher
#10 XtDispatchEvent <-- in my main event loop
That's it. I don't have an X11 library built for debugging, so I can't
trace through it.
----- Original Message -----
From: "P G" <email@hidden>
To: "Toshimitsu Tanaka" <email@hidden>
Cc: <email@hidden>
Sent: Sunday, April 16, 2006 6:59 AM
Subject: Re: Apple X11 + Japanese input method (kotoeri)
Toshimitsu Tanaka wrote:
Hi,
Try kinput2.MacIM.
The kotoeri is used with X11 for Mac OS X. (Japanese text)
http://www.sol.dti.ne.jp/~kikuyan/macosx/x11kotoeri.html
On 2006/04/16, at 20:35, P G wrote:
Hello All,
I have put in a LOT of effort trying to get the X11 preference "Use
system keyboard layout" to work.. finally with success for English and
French. (It seems I should have started off with the system's "xinitrc"
file when creating my own local one, as it contains some bits needed to
make this work.)
However, I cannot get the "kotoeri" input method to activate when
running X applications. It works fine for native Apple applications.
In X, though, the correct Latin key mappings for the Japanese keyboard
do get activated, but the input method does not... all grayed out.
I am using the Gnome desktop environment installed from DarwinPorts. Is
there something I need to do there in order to make this work? Note
that the current port does not work with any of the keyboard or
international options... they crash. Individual applications do allow
selection of "Default" or "X input method", however, but these have no
effect for my problem.
Any help is much appreciated!
--
Toshimitsu Tanaka
email@hidden
http://toshi3.cocolog-nifty.com/blog/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
Thank you very much for the reply. Are you saying that it is expected
behavior that "kotoeri" does not work in X11?
I will try installing "kinput2" now... It will be a good test of my
Japanese reading skills... :-)
Thanks again!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden