6
8

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.

vim-quickrunでjavacの出力が文字化けするのを直す

Last updated at Posted at 2014-03-03

terminalでの文字化けは

.bashrc
alias javac = javac -J-Dfile.encoding=UTF8

で治せるが,vim-quickrunの場合はvimrcへの設定が必要

.vimrc
let g:quickrun_config["java"] = {
      \ 'exec' : ['javac -J-Dfile.encoding=UTF8 %o %s', '%c %s:t:r %a']
\}

参考:vim-quickrun

##追記(2014/3/6)

コンパイルだけじゃなくて,実行時にもオプションが必要だった.

terminalの場合は

.bashrc
alias javac = javac -J-Dfile.encoding=UTF8
alias java  = javac -Dfile.encoding=UTF8

vimrcは

.vimrc
let g:quickrun_config["java"] = {
      \ 'exec' : ['javac -J-Dfile.encoding=UTF8 %o %s', '%c -Dfile.encoding=UTF8 %s:t:r %a']
\}

とします.

6
8
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
6
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?