Use UTF-8 encoding for commit messages in vim
commit6017a8db8831fb4b0a0240985602a07432be9355
authorAtsushi Nakagawa <atnak@chejz.com>
Wed, 7 Dec 2011 16:18:44 +0000 (7 10:18 -0600)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 7 Dec 2011 16:18:44 +0000 (7 10:18 -0600)
tree41c51c9ddb19eeb5523f3bdcb6e448e259509b4d
parent27e57a1e660fcc49b53afe272f698dcd1894404f
Use UTF-8 encoding for commit messages in vim

Set vim's default and assumed encodings for saving and loading commit
messages to "utf-8".

Since our vimrc contains no other encoding settings, the outcome is
expected to be "encoding=ACP termencoding=ACP fileencoding=utf-8".  Where
ACP is the multibyte codepage that's native to the user's system (for
example, "ascii" on an English system and "cp932" on a Japanese).
`encoding' gets its value from vim, `termencoding' implicitly from
`encoding' and `fileencoding' becomes the only available value in our
setting of `fileencodings'.

The value of ACP for `termencoding' needs to be retained because that's
the only encoding that current versions of vim support for displaying
characters native to the user's system[1].  On the other hand,
`fileencoding' needs to be "utf-8" because that's the expected encoding
for git's "COMMIT_EDITMSG" file.

This patch follows the discussion in the [2] link.

[1] http://groups.google.com/group/vim_dev/msg/3dd77f3014a60e43
[2] http://groups.google.com/group/msysgit/msg/55c582fb1b279d08
share/vim/vimrc