iterm 2 for mac book 使用 telnet 不能显示中文

1,149 views
Skip to first unread message

Zhao Quan

unread,
Mar 3, 2012, 7:56:47 AM3/3/12
to sh...@googlegroups.com
hi 大家好

我在mac book pro上使用Iterm 2 telnet 中文bbs
成功后,中文全部显示乱码。

我follow如下步骤处理(原文链接http://www.iterm2.com/#/section/faq

Q: I can't input Chinese/Japanese/Umlauts/Accents, why?

A: First of all, make sure your encoding settings is correct. For example, there are several encoding standards for Chinese, you need to know which one is used on your system. If you are running a local session, unicode is the standard of Mac OS X. To enable inputing unicode characters in your shell, put this in your ~/.inputrc

set meta-flag on

set input-meta on

set output-meta on

set convert-meta off

If you are running a telnet session, be sure you turned on the 8-bit data path. Try using "telnet -8 yourhost" in your command.


----------------------------------------------------

1 我使用 telnet -8 hostname登录

2 touch ~/.inputrc

3 open -e ~/.inputrc

4 加入如下内容

set meta-flag on

set input-meta on

set output-meta on

set convert-meta off

5 重启iterm2

但,中文依然乱码

故在此请教各位

谢谢

Felix Zhao

DR

unread,
Mar 3, 2012, 8:07:17 AM3/3/12
to sh...@googlegroups.com
用LC_ALL=zh_CN.gbk开一个终端,然后在那里面跑telnet

2012/3/3 Zhao Quan <felix...@gmail.com>:

Ray Song

unread,
Mar 3, 2012, 8:11:48 AM3/3/12
to sh...@googlegroups.com

没用吧。需要luit -encoding gbk

Yongwei Wu

unread,
Mar 3, 2012, 8:12:12 AM3/3/12
to sh...@googlegroups.com
关键是Iterm里的编码怎么设?我通常就使用Mac自己的Terminal,里面是有设定的,在"设置 > 高级 >
多语言环境"里。缺省编码是UTF-8,我选了一个不太常用主题,在里面把编码设成GBK,连接传统的中文telnet/ftp环境。

--
Wu Yongwei
URL: http://wyw.dcweb.cn/

Zhao Quan

unread,
Mar 3, 2012, 8:13:41 AM3/3/12
to sh...@googlegroups.com
请问,在哪里运行?

Zhao Quan

unread,
Mar 3, 2012, 8:15:29 AM3/3/12
to sh...@googlegroups.com
luit -encoding gbk 有效呢:)
谢谢

具体运行步骤,如下:
1 运行iterm 2
luit -encoding gbk
3 telnet ...

Zhao Quan

unread,
Mar 3, 2012, 8:16:24 AM3/3/12
to sh...@googlegroups.com
不过,telnet成功后为什么如此之慢呢?

easthero

unread,
Mar 4, 2012, 8:12:08 PM3/4/12
to sh...@googlegroups.com
iterm2明明可以设置终端编码

preferences-profiles-terminal-terminal emulation-character encoding

2012/3/3 Zhao Quan <felix...@gmail.com>

Zhao Quan

unread,
Mar 6, 2012, 9:11:35 AM3/6/12
to sh...@googlegroups.com
Yes, its work.
Thanks
Reply all
Reply to author
Forward
0 new messages