Convert the output of gpg to the correct encoding.

This commit is contained in:
Markus Braun 2011-07-05 08:57:47 +02:00
parent ac6ec713e6
commit b98c3fbd4a

View File

@ -839,6 +839,12 @@ fun s:GPGNameToID(name)
let &shellredir=s:shellredirsave
let &shell=s:shellsave
" when called with "--with-colons" gpg encodes its output _ALWAYS_ as UTF-8,
" so convert it, if necessary
if &encoding != "utf-8"
let output=iconv(output, "utf-8", &encoding)
endi
" parse the output of gpg
let pub_seen=0
let uid_seen=0
@ -903,6 +909,12 @@ fun s:GPGIDToName(identity)
let &shellredir=s:shellredirsave
let &shell=s:shellsave
" when called with "--with-colons" gpg encodes its output _ALWAYS_ as UTF-8,
" so convert it, if necessary
if &encoding != "utf-8"
let output=iconv(output, "utf-8", &encoding)
endi
" parse the output of gpg
let pub_seen=0
let finish=0