Better Support for Chinese in Ubuntu Edgy
Tuesday, November 28, 2006 3:28:30 PM
What is better? Ubunutu Edgy by default support chinese viewing, which means you can read chinese website by using firefox, and maybe you can read some text file in chinese. Observed and discover or not, the characters of chinese are ugly by default. The size of the character is not equal, and sometimes some character might be missing or appear in noisy symbolic. Check this screenshot for an example of ugly looking chinese viewing. Ignore the album arts and Amarok.
By default, no chinese input support. Okay that is no big deal, simply install scim and it will works fine. But if you didn't set it properly, you won't feel nice while writing in chinese. Again, some charater is missing, not in a nice shape and not equal size.
You can login to chinese locale gnome, and it maybe makes you feel be better. But all your menu wordings will be in mandarin, which It is not my preference, I do not like it at all. I want to login my default locale but with chinese locale support too.
Thing I hate the most is, xmms no not support chinese viewing. It doesn't seems to work no matter how I configure and I was really gave up but finally I had found the solution and make it right.
If you are looking to solves anyone of those, read further. But bare in mind, the solution bellow might be missing some steps, because I have apt-get a lots of packages while trying. I might miss out some of the steps, please inform me if you discover any.
First, apt-get some chinese locale.
sudo apt-get install language-pack-zh language-support-zh zh-autoconvert
Second, apt-get some chinese fonts.
sudo apt-get install xfonts-intl-chinese xfonts-intl-chinese-big ttf-arphic-bkai00mp ttf-arphic-bsmi00lp ttf-arphic-gbsn00lp ttf-arphic-gkai00mp
Search for more chinese fonts using apt-cache, and download this one, you really need this one, much much nicer.
sudo apt-get install xfonts-wqy
The full name of this font is call "WenQuanYi Bitmap Song 12", use it, it is a very nice font.
Okay, now can install scim.
sudo apt-get install im-switch libapt-pkg-perl scim-chinese scim-gtk2-immodule scim-qtimm scim-pinyin scim-tables-zh scim-modules-socket scim-modules-table
Play some trick to make scim as a default input for everything.
sudo im-switch -s scim -z default
Okay! This step is going to make your chinese characters looks better! Equal size and nice!
sudo fontconfig-voodoo -f -s zh_CN
What the heck? too simple isn't it? Re-login and have a nice feel first. Oh wait! bookmark this page first, you still need to read further later.
------ Re-login --------
Okay, check out your locale,
locale -a
You should have this two ,"en_US.utf8" and "zh_CN.utf8", you should have more, but at least must including this two. Okay, you are almost done. Anything else? emm... to trigger scim for insert chinese input, press ctrl+space. To temporary turn off chinese input and switch to english, press shift and release (scim-pinyin must triggered for that) and vice versa.
Do you still want your xmms to support chinese viewing or not? Yes, further down.
This is a bit tedious, but it is not difficult.
Check whether you have this file /etc/gtk/gtkrc.zh_CN, if do, copy over with another name.
sudo cp /etc/gtk/gtkrc.zh_CN /etc/gtk/gtkrc.zh_CN.utf-8
Then goto the font setting at xmms preference and paste this,
-adobe-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,-*-*-medium-r-normal--16-*-*-*-*-*-gb2312.1980-0,*-r-*
Before paste it, copy and backup the original one, in case you want to put back. If you don't have that file /etc/gtk/gtkrc.zh_CN, create it and paste the line bellows
# $(gtkconfigdir)/gtkrc.zh_CN
#
# This file defines the fontsets for Chinese language (zh) using
# the simplified chinese standard GuoBiao as in mainland China (CN)
#
# 1999, Pablo Saratxaga <pablo@mandrakesoft.com>
#
style "gtk-default-zh-cn" {
fontset = "-adobe-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
-*-*-medium-r-normal--16-*-*-*-*-*-gb2312.1980-0,*-r-*"
}
class "GtkWidget" style "gtk-default-zh-cn"
Not yet can view correctly? you need another step.
Download this,
sudo apt-get install xmms-mpg123-ja
After that, check out your xmms preference at audio-plugin, disable xmms-mpg123 and enable xmms-mpg123-ja and then configure xmms-mpg123-ja, switch to "title" tab. Uncheck the disable-id3v2 and select convert input from GB2312 to UTF-8.
Okay, you should be able to view chinese in xmms. If in the case you still can't, it might be your chinese character in id3 have corrupted, rewrite it.
Something I am not cover at this post:
I haven't try chinese input at open office suit, so I have no idea whether will it trigger any problems or not. If you face any problem on that, consider search on keyword "scim-bridge".














Unregistered user # Sunday, August 14, 2011 3:34:11 PM