12月14

FreeBSD bash在shell下的中文输入

| |
16:42FreeBSD  
在~/.profile或~/.bashrc文件中增加下面的內容:
#stty cs8 -istrip
#stty pass8
export LANG=zh_CN.GBK
export LC_CTYPE=zh_CN.GBK

另外在~/.inputrc(该文件不存在,需要手工创建)文件中增加如下:
# inputrc - global inputrc for libreadline
# See readline(3readline) and `info rluserman' for more information.

# Be 8 bit clean.
set meta-flag on
set input-meta on
set output-meta on

# To allow the use of 8bit-characters like the german umlauts, comment out
# the line below. However this makes the meta key not work as a meta key,
# which is annoying to those which don't need to type in 8-bit characters.
set convert-meta off

Tags: , , ,
阅读(462) | 评论(0) | 引用(0)