- 论坛徽章:
- 0
|
HP_UX中编辑器vi默认是不能够输入汉字的,强制输入时会转化成英文子目(奇怪?为什么不是乱码!别问我,我也不知道,反正我是没有见过乱码)。
解决方法如下:
1. 设置环境变量(语种支持)
#vi /etc/rc.config.d/LANG
默认的内容可能是:
#!/sbin/sh
# @(#) $Revision: 78.1 $
# Language preference. See lang(5), hpnls(5)
# LANG: Locale name
# Note: if using the default C locale, many commands will execute faster if
# LANG is not set.
LANG=C
export LANG
改为:
LANG=zh_CN.hp15CN
export LANG
2. 增加一行内容到文件/etc/profile
stty -istrip -parity cs8
(这个不是很重要,也可以写在用户的.profile配置文件里面或者直接在字符界面下输入这行内容、执行之)
3. 下次登陆时应该可以在vi中输入汉字了。 |
|