OSXのターミナルでの日本語環境

| No Comments | No TrackBacks

とりあえず、iBookで仕事をしてみようと思い立った。
それはいいのだが、標準では日本語がうてない(打っても化ける)ので、多少の設定が必要である。
以下、メモ書き。

terminal(標準shellはbash)上で、日本語入出力を行う
# vi ~/.inputrc
set convert-meta off
set meta-flag on
set output-meta on

emacs で日本語入出力行う
# vi ~/.emacs
(set-default-coding-systems 'euc-jp)
(set-keyboard-coding-system 'euc-jp)
(set-terminal-coding-system 'euc-jp)
(set-buffer-file-coding-system 'euc-jp)

# vi ~/.bashrc
function myemacs
{
stty raw;
emacs $1 $2;
stty -raw;
}
alias emacs="myemacs"

※この際に、terminalをウィンドウの設定→ディスプレイ→文字セットエンコーディング でEUC に設定しておく。
ちなみに、他のunix系とかにsshとかで入ったときもutf標準のやつ以外はこうしておかないと化けます。

No TrackBacks

TrackBack URL: http://caruma.org/mt-tb.cgi/1107

Leave a comment

About this Entry

This page contains a single entry by Caruma published on December 8, 2004 12:42 AM.

Homeディレクトリの移行 was the previous entry in this blog.

OSXのターミナルでの日本語環境其の二 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.