Encode commit messages as &tencv1.99.44
authorBob Hiestand <bob.hiestand@gmail.com>
Fri, 30 Sep 2011 15:10:13 +0000 (30 10:10 -0500)
committerBob Hiestand <bob.hiestand@gmail.com>
Mon, 3 Oct 2011 17:01:35 +0000 (3 12:01 -0500)
plugin/vcscommand.vim

index 66dd2ca..2698322 100644 (file)
@@ -920,6 +920,11 @@ endfunction
 " Function: s:VCSFinishCommit(logMessageList, originalBuffer) {{{2
 function! s:VCSFinishCommit(logMessageList, originalBuffer)
        let messageFileName = tempname()
+       if exists('*iconv') && has('multi_byte')
+               if(strlen(&tenc) && &tenc != &enc)
+                       call map(a:logMessageList, 'iconv(v:val, &enc, &tenc)')
+               endif
+       endif
        call writefile(a:logMessageList, messageFileName)
        try
                let resultBuffer = s:ExecuteVCSCommand('Commit', [messageFileName])