Display Simplified Chinese in Mac OS X 10.4 Shell

Displaying and edititing Simplified Chinese in Mac OS X shell can be a pain, the following show the correct way to make this possible.

1. Edit ~/.profile, add:

export LANG=zh_CN
export LC_ALL=zh_CN

2. Set terminal encoding to:

EUC_CN

3. Edit ~/.inputrc, add:

set meta-flag on
set input-meta on
set output-meta on
set convert-meta off

3. While in VI, enter following commands:

:set encoding
:set fileencoding

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*