- 论坛徽章:
- 0
|
缺省英文界面,cat、more都能正确显示文件中的汉字,但vi(包含使用vi界面的crontab)里却只能将汉字显示成\xxx的模样。
我知道如果将语言环境设置成zh系列,就可以解决这个问题了。
但我不喜欢中文语言环境下系统的提示、ls -l显示的时间等都是中文格式,反倒不方便,尤其是有些脚本是按英文格式来读取命令输出字符的。
我希望shell的界面仍然是英文的,但在vi下可以显示、输入汉字(或者不能输入也行,UE可以方便地ftp处理)
试了很多种LANG、LC_CTYPE、stty的组合,可我就是找不到合适的方案。
烦请各位高手指点迷津。谢谢!
我的环境:
SPARC,solaris 8,SHELL=/bin/ksh
LANG、LC_CTYPE变量都置空
stty -a的结果:(缺省已经是cs8 -istrip)
speed 38400 baud;
rows = 37; columns = 132; ypixels = 0; xpixels = 0;
csdata ?
eucw 1:0:0:0, scrw 1:0:0:0
intr = ^c; quit = ^\; erase = ^?; kill = ^u;
eof = ^d; eol = <undef>; eol2 = <undef>; swtch = <undef>;
start = ^q; stop = ^s; susp = ^z; dsusp = ^y;
rprnt = ^r; flush = ^o; werase = ^w; lnext = ^v;
-parenb -parodd cs8 -cstopb -hupcl cread -clocal -loblk -crtscts -crtsxoff -parext
-ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc
ixon -ixany -ixoff imaxbel
isig icanon -xcase echo echoe echok -echonl -noflsh
-tostop echoctl -echoprt echoke -defecho -flusho -pendin iexten
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel tab3
[ 本帖最后由 ncjh 于 2007-10-12 13:05 编辑 ] |
|