From: Bob Hiestand Date: Fri, 30 Sep 2011 15:10:13 +0000 (-0500) Subject: Encode commit messages as &tenc X-Git-Tag: v1.99.44^0 X-Git-Url: https://repo.or.cz/w/vcscommand.git/commitdiff_plain/ec10176ebd1c243f746ec7e6f732d657f025fce2 Encode commit messages as &tenc --- diff --git a/plugin/vcscommand.vim b/plugin/vcscommand.vim index 66dd2ca..2698322 100644 --- a/plugin/vcscommand.vim +++ b/plugin/vcscommand.vim @@ -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])