[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

控制台显示中文问题; Problem about View Chinese text in Console of Debian woody 30r2


DEBIAN woody 30r2 i386,
不启动 X ,不安装 zhcon, unicon, 可以在控制台显示中文吗?
比如用命令 ls, cat, editor, lynx 时可以显示中文.

我看过好多介绍,都是叫安装zhcon, unicon, cce, 等。

1. dpkg-reconfigure locales
2. /etc/locale.gen 增加 zh_CN GB2312; locale-gen
3. 在 /etc/enviornment 设置环境 LANG=zh_CN
4. ~/.bashrc 增加 LANG=zh_CN; LC_CTYPE=zh_CN
5. 安装时locale选择GB2312, default locale 设为 C 或者 zh_CN

唯一的效果是输入错误命令,比如 ls -e,显示的消息会有乱码,
用ls -e 2>errmsg; less errmsg会看到有NON-ASCII字符,但是会有奇数个字节的情况,

有人知道该怎么做吗? 谢谢


If you cannot read chinese, please read this, or please ignore the text below.

I'm using woody 30r2 on a i386 platform,
and I want to view Chinese in console without `zhcon' or `unicon' installed.
So that commands like `ls', `cat', `editor', `lynx' and so on,
could display Chinese characters in text mode console.

I have read a lot of articles about this,
most of them tell that I should install some additional software packages,
I dont want to do this since I think that's not elegent.
I want native support of Chinese language in DEBIAN.

My efforts listed below:
1. "dpkg-reconfigure locales", where I selected zh_CN package;
2. Add a line "zh_CN GB2312" to "/etc/locale.gen", then run "locale-gen";
3. Add "LANG=zh_CN" into "/etc/enviornment" and re-login;
4. Add "LANG=zh_CN; LC_CTYPE=zh_CN" to my "~/.bashrc" and re-login;
5. When installing select "zh_CN" in locales, set default locale to "C" or "zh_CN";

all above seemed not work,

the only effect was when I typed a wrong command in console such as "ls -e",
I got a error message contains non-ascii characters,
"ls -e 2> errormsg; less errormsg" will show hex value of these non-ascii characters,
ex. "<AB>" and "<B5>" in output of "less",

the number of these non-ascii chars was odd(1,3,5, ...) or even(2,4,6,...),
but one Chinese character always contains two bytes,
so I guess there must be errors somewhere,
and I couldnot decide where it sits.

Would anyone please help me?

I'm NorthWind from China

Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
Reply to: