Issues with Fcitx-Sougou for Chinese input in Emacs

Posted by:

Fcitx to input Chinese in Emacs

This was one of most obnoxious problems. With installation of my favorite Sougou(搜狗) IME, I can input Chinese in any application (even in Terminal) with Sougou but emacs. After banging my head on this issue for a long time, following is what I have figured out, and yes, it is working fine now.

Following are some notes while I was doing the debugging. Hope it will help some souls out there.

  1. First, testing Emacs without any customization.

    works fine with C-~ to switch and input with Fcitx, which means it works fine without any customization of Emacs.

  2. However,when Emacs started with -q no-site-file no-init-file no-splash any combination, Fctix stops working.
  3. After some research, what I figured out is that the ‘ -Q’ argument automatically sets inhibit-x-resources to t, in addition to prevent the initialization of site and init files. link1 link2
  4. To my surprise, after disable ~./Xresoures, and restart Arch Linux, Fcitx works fine with Emacs. Please note that the Emacs built-in IME still could be evoked with C-\. Scr-fcitx-emacs.png

    I have following code in ./Xresources

    In script file .xprofile, add following lines to support GTK+ and Qt modules Fcitx in Arch Linux.

  5. Following are related setting about locale in Arch Linux.

  6. Hope this will be of help to someone.


  1. Xiang  December 22, 2015

    I see that this is something that works on ArchLinux. Do you also have any idea how an analogy might be on Ubuntu? I set LC_CTYPE=zh_CN.UTF-8 on Ubuntu, and I can now switch fcitx input engines. However, I still can’t input any Chinese or Japanese characters. All the input automatically becomes normal English character one by one. Also If I tried to key in the acute mark in Spanish input, an error message is shown: ” is undefined”, so it’s still not working. Only languages like German, which directly input characters, seem to work.

    • mistan  December 30, 2015

      Hi Xiang,

      I will try it out with my Ubuntu box when I have a chance.



Add a Comment