Help us understand the problem. What is going on with this article?

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

More than 5 years have passed since last update.

terminalでの文字化けは

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の場合は

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']
\}

とします.

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした