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 *

*
*

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Site hosted by