diff --git a/plugin/gnupg.vim b/plugin/gnupg.vim index e0b8f51..bcc94a6 100644 --- a/plugin/gnupg.vim +++ b/plugin/gnupg.vim @@ -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