I check the source and I found: in src/xfns.c: create_frame_xic() xic = XCreateIC (xim, XNInputStyle, xic_style, XNClientWindow, FRAME_X_WINDOW (f), XNFocusWindow, FRAME_X_WINDOW (f), XNStatusAttributes, status_attr, XNPreeditAttributes, preedit_attr, NULL); When the locale (LC_ALL)is en_US.utf8, the return value of XCreatIC is NULL. When set the locale to zh_CN.utf8 , the return value of XCreateIC is OK, and SCIM or IBUS works fine. I don't know why. On Sat, Sep 4, 2010 at 9:14 PM, Štěpán Němec wrote: > "Shaowei Wang (wsw)" writes: > > > Hi all > > I want to use xim program(scim) with emacs and I have some issues here. > > > > My scim works find with gtk programs and other X programs(rxvt-unicode) > but > > emacs. I found the locale is the > > key point. > > [...] > > > I did lots of google searchs. Some guy said it is the Xorg problem and > > others said it's the font (may be font path) problem. > > But how do we explane that other X program works fine with scim? > > I'll let others do the explaining, but rest assured that getting GUI > Emacs to work with SCIM or IBus is non-trivial. AFAIK you need > third-party packages for that, specifically for SCIM I used to use this > (now I'm using the IBus interface by the same author): > > http://www.emacswiki.org/emacs/ScimBridge > > [Also note that this is emacs-devel; questions of this sort are better > served on help-gnu-emacs@gnu.org or other help fora.] > > Štěpán >