.vimrcの日本語設定は↓ set encoding=japan if has('iconv') set fileencodings+=iso-2022-jp set fileencodings+=utf-8,ucs-2le,ucs-2 if &encoding ==# 'euc-jp' set fileencodings+=sjis else set fileencodings+=euc-jp endif endif
$locale ↓ちょっと怪しい結果になっています。原因はこのあたりでしょうか・・・? locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory LANG=ja_JP.SJIS LC_CTYPE="ja_JP.SJIS" LC_NUMERIC="ja_JP.SJIS" LC_TIME="ja_JP.SJIS" LC_COLLATE="ja_JP.SJIS" LC_MONETARY="ja_JP.SJIS" LC_MESSAGES="ja_JP.SJIS" LC_PAPER="ja_JP.SJIS" LC_NAME="ja_JP.SJIS" LC_ADDRESS="ja_JP.SJIS" LC_TELEPHONE="ja_JP.SJIS" LC_MEASUREMENT="ja_JP.SJIS" LC_IDENTIFICATION="ja_JP.SJIS" LC_ALL=
また、localeの結果ですがroot権限で行うと以下の3行のエラーが出ないようです。 locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory
locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory
今回の場合、OSで「ja_JP.SJIS」がサポートされていないのが原因だと思います。
以下のコマンドを実行しください。
$ locale -a | grep ja ja_JP ja_JP.eucjp ja_JP.ujis ja_JP.utf8 japanese japanese.euc
locale -a | grep ja の結果は locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_COLLATE to default locale: No such file or directory ja_JP ja_JP.eucjp ja_JP.ujis ja_JP.utf8 japanese japanese.euc