Inputmethod without locale mini-HOWTO

  • GTK+ 2.x and Qt libraries support immodule. You may use inputmethods without XIM nor locales.
    Gcin and uim support GTK+/Qt immodules, and they are very stable.
    Scim also supports GTK+/Qt immodules, but they have C++ ABI incompatibility problem. Scim-bridge is C based immodule for scim, but it still have some compatibility problems.
  • Almost all Gnome/KDE applications support immodules in any locale. You may even use inputmethods in locale "POSIX" (also known as locale "C"). However, a few GTK+/Qt applications still need locales to support immodule (It is a BUG!).

Step 1

  • Remove your locales.

Step 2

  • Install gcin.

Done

  • It is done. There is no Step 3. :-)
  • In most GTK+/Qt applications, you may right click to select immodules.
    For example, you may right click in gedit, and select "gcin Input Method".

Useful tips

  • Some distributions have gcin-qt3-immodule/gcin-qt4-immodule or something similar. You may also need them.
  • Recommended text editor: leafpad
    Leafpad can recognize UTF-8 documents automatically. It can also save/load other encoding files without problem.
    You may assign any specific encoding when invoking leafpad.
  • Under terminal emulators:
    Write those 2 lines below to your ~/.inputrc
    set convert-meta off
    set output-meta on
    
  • You may want to alias "less" as "less -fr" for convenience.
  • If you use pcmanx-gtk2 to view Chinese BBS, put those 3 lines below to your ~/.pcmanx/pcmanx
    [Display]
    FontFamily=AR PL Mingti2L Big5
    FontFamilyEn=AR PL Mingti2L Big5
    
  • If you encounter wrong-font-mapping in Adobe flash9, just export LC_ALL and restart your browser or flash player. No real locale is needed. Just export it and run.
    export LC_ALL=zh_TW
    firefox &
    
  • Mrxvt and rxvt may apply a simple patch to support gcin without XIM nor locale. You may download them here.