Internationalization with SCIM
I have SCIM and UTF-8 working smoothly with pretty much every program other than emacs. Here is a narrative of the process I went through; you can skip to the end to see immediately all of what is needed.
A while ago, I installed Scim pretty painlessly for Gtk and Qt apps with the following commands:
scim -d export GTKIMMODULE=scim export QTIMMODULE=scimBut for some reason, I couldn't get the more generic XIM working, which would magically allow everything in X to use SCIM and thus input japanese characters. The magic incantations was supposed to just be:
export XMODIFIERS='@im=SCIM'Note that the uppercase
SCIM is intentional. Well, as it turns out, I didn't have my other locale variables set right - I had set LCCTYPE='enUS.UTF-8′ and LANG too. The thing I didn't realize is that LCALL overrides, rather than behaving as a default, and Gentoo's default is LCALL=enUS. So by simply unsetting LCALL, rxvt-unicode and mlterm and Openoffice and mozilla magically starting working with SCIM and also some things that couldn't display UTF-8 before all of a sudden could.
Now, I can see japanese text in vim in the console, I can echo it and redirect to a file, I can name files with japanese chars. But the funny thing is I still don't have japanese chars or input in gvim or emacs, where you'd think it might be easier. Well, I don't care about gvim but I certainly intend to get it working in emacs.
Another cool thing I did (and the reason for a lot of this) was to write some UTF-8 xml parsing code with PXP and O'Caml. It was a wonderful experience.
To summarize, here is the process which I believe will get Gentoo japanized, if not totally internationalized:
Hopefully, you have USE="nls cjk"
Also, some japanese fonts
emerge uim scim scim-uim scim-qtimm gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules scim -d export GTKIMMODULE=scim export QTIMMODULE=scim export XMODIFIERS='@im=SCIM' export LCALL="enUS.UTF-8″
I run them before X
Filed under: Linux by Kenn
Leave a Reply
You must be logged in to post a comment.