LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 950|回复: 1

How to Input Chinese (English UTF-8)

[复制链接]
发表于 2004-11-16 22:09:34 | 显示全部楼层 |阅读模式
I found some messages about this, but i still can't input Chinese.

I seldom use Chinses and I'm familiar with English interface. I want to know how I can input Simplified Chinese/Traditional Chinese/Japanese/Korean in English UTF-8 mode. At least  Simplified Chinese.

This is easy in Windows 2000/XP/2003 and Mac OS X. But I can't do it in Linux (Mandrake 10.1 Official)!

===================================
Thanks very much!!!
发表于 2004-11-17 08:19:56 | 显示全部楼层
It's easy. You can feed certain environment variables to a program without altering the global environment variables. For example, in bash, you can run mrxvt as the following:
    $ LC_CTYPE=zh_CN mrxvt &
In csh/tcsh, you can run mrxvt as the following:
    $ env LC_CTYPE=zh_CN mrxvt &

Now you see the solution for you. For example, to start scim and mrxvt, you can run commands in shell like the following:
    $ LC_ALL=zh_CN LANG=zh_CN scim -d
    $ LC_CTYPE=zh_CN mrxvt -km gbk &

The above two commands only set the environment variables LC_ALL, LANG and LC_CTYPE to the scim/mrxvt, but not the variables for your shell. So if you start another application within this shell like usually, they get the environment variable as usually - in your case, en_US.UTF8.

You can setup alias for these commands if you do not want to type the environment variables every time when you start scim/mrxvt.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表