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

Re: Problem about View Chinese text in Console of Debian woody 30r2



Sorry,前一封信没有设置正确编码,全是???。:-p

我可能说的不是你想要的。我的debian box是通过telnet或ssh访问控制台的,只
要访问
的终端支持中文就可以看了。比如在windows桌面上用putty就可以很好的看中文信息。
至于在本地,你的控制台如果本身不支持中文显示,当然看不到正确的中文显示。所
以需要zhcon等等。

cp wrote:

> 大家好
>
> 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.
>
> Hi,
> 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?
> Thanks
>
> I'm NorthWind from China
>
> ------------------------------------------------------------------------
> Do you Yahoo!?
> Win a $20,000 Career Makeover at Yahoo! HotJobs
> <http://pa.yahoo.com/*http://us.rd.yahoo.com/hotjobs/hotjobs_mail_signature_footer_textlink/evt=23983/*http://hotjobs.sweepstakes.yahoo.com/careermakeover>





Reply to: