10
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

macのターミナルでkeytoolを使った際の文字化け対策

Last updated at Posted at 2012-06-20

macのターミナルでJDK等のkeytoolを使った際に、文字化けが発生する。
macのターミナルの文字コードがデフォルトでUTF-8になっているのに対して、macにインストールされているJDKのデフォルトの文字コードがShift_JISになっているのが原因ぽい。
環境変数 _JAVA_OPTIONSで文字コードを指定できるので、以下のように.profileに記述を追加した。

~/.profile
export _JAVA_OPTIONS='-Dfile.encoding=UTF-8'
$ source ~/.profile
10
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?