LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   chinese character input and display -- need help (https://www.linuxquestions.org/questions/slackware-14/chinese-character-input-and-display-need-help-193229/)

carboncopy 06-14-2004 02:59 AM

chinese character input and display -- need help
 
Hi!

I need to set up a Slackware system with chinese character input and display capable. I have no idea how to go about it. Please help me.

Thanks in advance.

keefaz 06-14-2004 03:45 AM

first go to /usr/share/kbd/consolefonts and figure out what is the china font for console, then modify /etc/rc.d/rc.font to suit it.

Go to /etc/profile.d, edit lang.sh and lang.csh and set the correct value for LANG, LANGUAGE, LC_MESSAGES, LC_ALL, LESSCHARSET variables.

Go to /usr/share/kbd/keymaps and try to find the keyboard map for china, once found, edit /etc/rc.d/rc.keymap with the correct value.

I can't say more I just know configure it for french ;)

JDW 06-14-2004 05:39 AM

chinese character input and disaplay - need help
 
Hi,

I don't know much about how Slackware is setup, but I do know that looking at /usr/share/kbd/keymaps will not help you, because unlike French or Russian or English etc. , languages such as Chinese, Japanese & Korean have multi-byte encoding, and a regular keymap just won't cut it with literally thousands of characters to choose from.

However, to be able to type Chinese in a word processor such as Open Office Writer, you need to have a couple of things set up before hand.

Firstly, you need to make sure that you have the locale files installed for Chinese. Type "locale -a" at the prompt and this will list all the locale files installed on your system. If you have locale files called zh_CN, or zh_TW etc., then you are in business. If not, find the locale files on your distro CD or on the internet and install them.

Secondly, you will need Chinese fonts, the four Arphic fonts found with most popular distros are a great start.

Thirdly, if you plan to use KDE you will need to also install the kde-i18n files for Chinese, these should also be somewhere on your distro CDs.

Then you need to set the user locale to Chinese, but I don't know if Slackware is the same as Fedora/Red Hat/Mandrake etc. type distros, so I don't want to give you the wrong info, but this is how I do it ; I append the following lines in the .bashrc file in the user's home directory :-

export LANG=zh_CN
export LC_ALL=zh_CN
export LC_CTYPE=zh_CN
export XMODIFIERS=@im=scim

N.B. If you want Traditional Chinese, type zh_TW instead.
N.B. scim refers to one type of Input Method server program, others exist such as xcin, chinput and fcitx.

Hope this gets you started...

cheers,

jdw

carboncopy 07-06-2004 12:03 AM

Okay, Sorry I took so long to get back to this, but finally I got the hardware to set it up. i have two questions (other then setting up chinese support)

Question 1:
Is it okay if I have a seperate user for the chinese setup?
i don't want a system wide setup.

root will stay ENGLISH (please) ; I can't read and write chinese.


Question 2:
Where can I get chinese fonts?

On the side note, I have installed some chinese fonts on my system by putting them in /usr/local/fonts/ch and fc-cache it. When I go to chinese websites, some characters are still missing (looks like mahjong).

JDW 07-06-2004 05:28 PM

chinese character input and display -- need help
 
Hi,

1) Yes, you can make a separate user with Chinese settings. You should already have a normal English user (without root priveleges). Just create another user, and change the locale and XMODIFIER settings in that user's ~/.bashrc file.

I have never seen or tried Slackware (although I hope to in the not to distant future, Slack-users seem fairly proud of it), but I seem to remember something about Chinese support not being built-in by default, and that you have to set stuff up manually - my memory ain't clear on that, it may have been an old post about an older version of Slackware.

2) Most major distros would include the free arphic TT chinese fonts, but I'm not sure about Slack, however, I found this through googling - Chinese system setup in linux - which has a section on setting up in Slackware 9.0.

If you search the Net ("Chinese fonts download"), you will find plenty of sites with a wide variety of fonts...

carboncopy 07-06-2004 08:12 PM

Thanks!

This is what I have done,

1. locale -a (root)
shows

zh_CN
zh_CN.gb18030
zh_CN.gbk
zh_CN.utf8
zh_HK
zh_HK.utf8
zh_TW
zh_TW.euctw
zh_TW.utf8

2. Copied the downloaded chinese fonts to /usr/local/share/fonts
edit /etc/fonts/fonts.conf to include the path above.
run fc-cache

3. I have installed kde-i18n (chinese)
(the last time I start it (before I put in the fonts) I get mahjong character.

4. I edited /home/user/.bashrc

But when I log-in (ssh) as the user
and issue the comand locale, I get:
LANG=en_US
LC_CTYPE="en_US"
LC_NUMERIC="en_US"
LC_TIME="en_US"
LC_COLLATE=C
LC_MONETARY="en_US"
LC_MESSAGES="en_US"
LC_PAPER="en_US"
LC_NAME="en_US"
LC_ADDRESS="en_US"
LC_TELEPHONE="en_US"
LC_MEASUREMENT="en_US"
LC_IDENTIFICATION="en_US"
LC_ALL=

Will check out man locale


All times are GMT -5. The time now is 12:48 AM.